Merge branch 'authentication' into dev

This commit is contained in:
Michal Kváček
2016-01-21 02:54:02 +01:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ class Authenticate
*/ */
public function handle($request, Closure $next, $guard = null) public function handle($request, Closure $next, $guard = null)
{ {
if (Auth::guard($guard)->guest()) { if (Auth::check()) {
if ($request->ajax()) { if ($request->ajax()) {
return response('Unauthorized.', 401); return response('Unauthorized.', 401);
} else { } else {
+1 -1
View File
@@ -36,5 +36,5 @@ Route::group([
'namespace' => 'Admin', 'namespace' => 'Admin',
'prefix' => 'admin' 'prefix' => 'admin'
], function () { ], function () {
Route::get('/', 'Dashboard@getIndex'); Route::get('/', 'Dashboard@getIndex')->name('admin.dashboard');
}); });