A
A
Anton Izmailov2015-10-18 21:01:44
Laravel
Anton Izmailov, 2015-10-18 21:01:44

How to reserve a variable in all views?

In general, the problem is this - I haven’t worked with Laravel for a long time and I can’t remember how to do it in such a way as to reserve a variable, let’s say $user in all views without setting it in each call.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2015-10-18
@WapGeaR

laravel.com/docs/5.1/views#sharing-data-with-all-views
or
laravel.com/docs/5.1/views#view-composers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question