Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between view and view:make?

Tags:

php

laravel

blade

I am starting to learn laravel and saw two ways to return a view.

1.

return View::make('login');

2.

return view('login');

Im not sure what the advantage of View::make is. Even after reading the API documentation. https://laravel.com/api/5.4/Illuminate/View/Factory.html#method_make

like image 353
Black Avatar asked Feb 24 '17 07:02

Black


Video Answer


1 Answers

They both do the same, first one is through the use of Facade's The second one is a helper method.

Doesn't matter which one you use, just choose the syntax you prefer.

like image 174
Niek van der Maaden Avatar answered Oct 20 '22 01:10

Niek van der Maaden