adminlte-laravel icon indicating copy to clipboard operation
adminlte-laravel copied to clipboard

Add to window.Laravel the logged user?

Open acacha opened this issue 7 years ago • 2 comments

Maybe could be optional (config file)

Use:

<script>
        window.Laravel = {!! json_encode([
            'csrfToken' => csrf_token(),
            'user' => Auth::user()
        ]) !!};
    </script>

To htmlheader.blade.php partial.

acacha avatar May 18 '17 19:05 acacha

Take into account window.Laravel is removed/deprecated in new Laravel versions

acacha avatar May 20 '17 06:05 acacha

Why this change?

https://github.com/acacha/vue-laravel-authorization

acacha avatar May 20 '17 06:05 acacha