Recently, I downloaded the Lumen package and used {code...} in the controller ...} it is displayed, but {code...} is used in the controller ...} the project is displayed as normal. In resourcesviews, there is a user. balde. php. I wonder if anyone is reading Lumen recently...
Recently, I downloaded the Lumen package and used it in the controller.
return view('user');
Show
But in controller
return view()->file('..\resources\views\user.blade.php');
The project is displayed as normal.
In
Resources \ views contains user. balde. php
I wonder if anyone is reading Lumen recently. Could you tell me why this View can be used only when I specify a path?
Reply content:
Recently, I downloaded the Lumen package and used it in the controller.
return view('user');
Show
But in controller
return view()->file('..\resources\views\user.blade.php');
The project is displayed as normal.
In
Resources \ views contains user. balde. php
I wonder if anyone is reading Lumen recently. Could you tell me why this View can be used only when I specify a path?
I think the landlord should have switched from laravel4 [L4 for short.
What is written on L4?View::make('user')
.
On lumen, view () is a help function,
If no parameter exists, the system returns the newly created instance of the View class.
So you can writereturn view()->make('user')
.
Then, in the official manual,return view('user')
,
This statement is also supported, so it should be a BUG,
Install the latest version ~composer update
First Choice statement, I have not actually used this lumen ha
I'm curious where you can see the file name in the form of "user. blade. php ".view("user")
Insteadview("user.blade")
You can try echoview()->exists('user.blade')
See if you can find
The namespace does not seem to be provided in lumen.