Closed cryptoBOOOOM closed 8 years ago
Is this happening on a route that is provided with Sentinel or a separate route that is part of your application?
its happening everywhere, i created two laravel 5.2 projects yesterday with all the same setup: bootstrap + sentinel.
In my master template i included the code you see in my first post. But also when i dd(Sentry::getUser())
it returns null...
I have only been able to replicate this when I try it on a route that does not go through the laravel middleware. Are you using the "web" middleware group and still having this problem?
In your route make sure you group by web middleware like below, then make sure you are using sentry laravel facade full namespace like \Sentry::check();
Route::group(['middleware' => ['web']], function ()
{
Route::group(['prefix'=>'merchants','middleware'=>'sentry.auth'],function()
{
Route::post('/{user_hash}',['as'=>'merchants.store','uses'=>'MerchantController@store']);
});
});
sorry for the late reply, but that fixed it!
Sentry::check() always returns false....