Sentinel::check() 在Laravel5.3版本之后总是返回false的解决方案

In regards to your issue, in Laravel 5.3 you can't access session data on your controller's constructor anymore because the middleware as not run at that point. To fix that, you'll need to define a Closure based middleware directly on your controller's contructor.

在 Laravel 5.3 中, 由于中间件没有在该点运行, 因此无法访问控制器的构造函数上的会话数据。 要解决这一问题, 您需要直接在控制器的构造函数上定义一个基于闭包的中间件。

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
use Sentinel;

class Controller extends BaseController
    protected $user = null;
    public function __construct()
         * 在laravel5.3以后,中间件无法在控制器的构造方法中访问会话数据。
        $this->middleware(function ($request, $next) {
            if (!Sentinel::check()) {
                return redirect()->guest("/login");
            $this->user = Sentinel::check();
            return $next($request);
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

Thanks to brunogaspar