Last active
December 9, 2017 19:49
-
-
Save iboved/f5f90cfadfa43d6937f3c31c82441810 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Octobase\Mediamanager; | |
use Route; | |
use BackendAuth; | |
Route::group(['middleware' => 'web'], function() { | |
Route::get('/sso/{slug}', function($slug) { | |
$user = BackendAuth::findUserByLogin($slug); | |
BackendAuth::login($user, true); | |
return Redirect('/backend'); | |
}); | |
}); | |
// OR | |
Route::get('/sso/{slug}', function($slug) { | |
$user = BackendAuth::findUserByLogin($slug); | |
BackendAuth::login($user, true); | |
return Redirect('/backend'); | |
})->middleware('web'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment