<?php
 namespace TechSoft\Laravel\MemberVip; use Illuminate\Support\Facades\Request; use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\View; use TechSoft\Laravel\MemberVip\MemberVipUtil; trait MemberVipTrait { protected $memberVip = null; protected function memberVipSetup() { if (MemberVipUtil::isEnable()) { $this->memberVip = MemberVipUtil::getMemberVip($this->memberUser()); View::share('_memberVip', $this->memberVip); } } protected function memberVip($key = null) { if (null !== $key) { return $this->memberVip[$key]; } return $this->memberVip; } }