0
I’m studying more on my own Laravel, and yes I’ve looked at his documentation on routes and I can’t make it work here.
I ran a little test:
Route::get('/', function () {
return view('welcome');
});
Route::get('teste', function() {
return view('teste');
});
and created the archive teste.blade.php
in the briefcase resources/views/teste.blade.php
this along with the file welcome.blade.php
, where it works smoothly, but when I put in the browser dev.project/teste
He can’t find the file.
but put yourself dev.project/
he opens the file Welcome.
someone can tell me if any configuration is missing, or maybe I have to create a controller file to run?
you executed by some server or was the PHP itself?
– novic
The correct thing is to create a controller file and from there you call the view. The Routes.php file should only be to do this route transfer to controller and not to perform functions or call views..
– Luiz Gustavo Costa Ceolin