A
A
AleDv2016-07-07 10:58:05
Laravel
AleDv, 2016-07-07 10:58:05

Why does csrf_token() on Laravel 5.2 return null?

Hi everyone, this is such a bummer. I don’t understand how csrf_token() works on Laravel 5.2.
There is such a template structure:
main.blade (in it {{ csrf_token() }} produces null) ---v
show.blade (using @include I integrate with main. Here the call {{ csrf_token() }} works correctly and returns token) ---v
comment.blade (embedding in show. Here {{ csrf_token() }} returns null again).
All routes have already been added to the web group. I can't even imagine what could be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ablizin, 2016-07-07
@AleDv

Have you done migrations out of the box? The database must have at least a users table and a remember_token column

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question