How to use laravel Auth::user() outside laravel and pass data in custom php?
I am trying to implement simogeo filemanager into laravel and using it in combination with tinymce i will use it without tinymce also but that's not the problem.
I have already configured setup and installed all, and it works fine so far, but last one step is to make sure that only authorized users can call filemanager and upload files, and also there is an option to filemanager to have user specific folders. For that i will have to pass Auth::user() from laravel and check if user is loged in, and also if i use Auth::user()->username i would be able to have user specific folders.
Is there a way to pass Auth::user() for outside script from laravel?
This doesn't help, i don't have an app.php in bootstrap folder, and i also don't have Illuminate\Contracts\Http\Kernel anywhere in laravel. it's probably difference between versions. i use Laravel Framework version 4.2.16
This doesn't seem to create a new session if one does not exist. The laravel_session cookie is missing, unless you first load laravel through a standard route. I'm using L5.2.
I'm finding that run externally, the headers are never sent. (Probably because it has no view.) Any idea how I might get those headers push out with the response?
@bestmomo in Laravel 5.3 I have this error with your solution: "Call to undefined method Symfony\Component\HttpKernel\Event\GetResponseEvent::setDispatcher()".
However if I do dd($app['auth']->user()) I can see the Model for the User that is authenticated. Only when I try to follow with some lines of my script the error is shown.