<?php
 namespace Module\Member\Auth; use Illuminate\Support\Facades\Session; class MemberUser { public static function id() { return intval(Session::get('memberUserId', 0)); } public static function user() { return Session::get('_memberUser', null); } public static function get($key = null) { $user = self::user(); if (null === $key) { return $user; } return isset($user[$key]) ? $user[$key] : null; } }