Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make window.Laravel.csrfToken unneccesarry #4260

Closed
wants to merge 1 commit into from
Closed

Make window.Laravel.csrfToken unneccesarry #4260

wants to merge 1 commit into from

Conversation

DrowningElysium
Copy link
Contributor

I don't like the fact we have to add

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

To have it working, when the docs suggest adding only the meta tag. This will get the token from the meta tag.

I don't like the fact we have to add 
```
<script>
        window.Laravel = {!! json_encode([
            'csrfToken' => csrf_token(),
        ]) !!};
</script>
```
To have it working, when the docs suggest adding only the meta tag. This will get the token from the meta tag.
@taylorotwell
Copy link
Member

This was merged. Not sure why it shows it wasn't.

taylorotwell pushed a commit to laravel/framework that referenced this pull request May 10, 2017
If PR laravel/laravel#4260 is accepted we will no longer need window.Laravel
symfony-splitter pushed a commit to illuminate/auth that referenced this pull request May 10, 2017
If PR laravel/laravel#4260 is accepted we will no longer need window.Laravel
taylorotwell pushed a commit to illuminate/auth that referenced this pull request Sep 17, 2018
If PR laravel/laravel#4260 is accepted we will no longer need window.Laravel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants