memberSetmealRepository = $memberSetmealRepository; } public function handle($request, Closure $next) { $template = false; $companyInfo = auth('web-company')->user(); if (!$companyInfo->nature || !$companyInfo->scale || !$companyInfo->organization_code || !$companyInfo->district || !$companyInfo->trade || !$companyInfo->contents) { return redirect()->route('com.info')->with('message', "请完善企业基本信息后,再进行其他操作"); } $tpl = Tpl::where(['tpl_type'=>1,'display'=>1])->get(); if(!$tpl->isEmpty()){ $template = true; } $GLOBALS['template'] = $tpl; View::share('template', $template); return $next($request); } }