How to pass multiple variables by controller to blade file?
Answer Posted / sachin-laradev
return view('view-file', compact('var1', 'var2', 'var3'));
NOTE :- variables in compact will be used without $ sign
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is laravel faster than rails?
Do you know what is php artisan. List out some artisan commands?
What is laravel passport?
What are the example of services?
How to get user’s ip address in laravel?
What is a Laravel - Encryption ?
How to create a controller in laravel?
What are the difference between insert() and insertgetid() in laravel?
Explain about Form without CSRF token in Laravel ?
What are the 3 service provider types?
What are the Forms in Laravel ?
What is stack channel?
How to get data between two dates with query in laravel?
What route model binding?
State the difference between get and post method.