Skip to content

Add to window.Laravel the logged user? #265

Open
@acacha

Description

@acacha

Maybe could be optional (config file)

Use:

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

To htmlheader.blade.php partial.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions