Answer the question
In order to leave comments, you need to log in
How to pass another View with return?
Good afternoon, such a question as in Laravel with return response()->json($data);
pass
View::make('form')->with('param', '1');
just enter $view = View::make('form')->with('param', '1');
does not pass
More:
there is form.blade.php there is an input with connected typeahead.js when entering it sends a request to the controller and then receives data (return response()->json ($data);), but I also need to pass the $form variable from the controller in form.blade.php
Answer the question
In order to leave comments, you need to log in
Good afternoon!
I can not understand the question, but I will write.
You have a controller, it has a method that returns you a form
for example
public function index()
{
return view('home');
}
return view('home', ['form' => 'value', 'key' => 'value2']);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question