jquery - Laravel returning view -
what difference between,
return view::make('hello'); and
return view('hello'); and
return 'hello'; they produce same output why 3 syntaxes?
actually, examples bit different.
view() helper function operating view::make(). doing way, don't have use view; @ top of controller (or service class) in manner. behind scenes laravel make view instance , populate arguments passed in. in example, hello.blade.php.
returning 'hello' different because there no blade file involved , passed string passed response object directly.
check out these links, api. can helpful.
Comments
Post a Comment