Hi I'm trying to do a login function in a external app, its works but the session does not persists when refresh.
function laravelLogin($id)
{
require $_SERVER['DOCUMENT_ROOT'].'../laravel/vendor/autoload.php';
$app = require_once $_SERVER['DOCUMENT_ROOT'].'../laravel/bootstrap/app.php';
$app->make(Illuminate\Contracts\Http\Kernel::class)
->handle(Illuminate\Http\Request::capture());
$user = $app->make('App\Models\User')
->where('id',$id)
->first();
$app->Auth::login($user);
}
Thanks!
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2DLOeSv
via IFTTT
Aucun commentaire:
Enregistrer un commentaire