A
A
Arthur2018-08-24 10:55:45
Laravel
Arthur, 2018-08-24 10:55:45

How does passing data from controller to view work laravel?

I wonder how exactly the with() method works to pass data from the controller to the view?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Aksentiev, 2018-08-24
@Sanasol

https://github.com/laravel/framework/blob/5.6/src/...

V
Victor, 2018-08-24
@v_decadence

It simply adds data to the $data array property of the Illuminate\View\View class, which is then passed to the Blade template.

V
vism, 2018-08-24
@vism

this mechanism is in the view rendering code.
Standard PHP products.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question