-2
I would like to say that I am extremely lay in PHP and Laravel, but I am trying to learn for a job. I’ve done a basic CRUD before with the tool but I have a question on a current project.
I created an application in Laravel, my goal is for a patient to register but first go through a home screen. In the 'views/layouts' folder, I changed the 'Welcome.blade.php' to my need, in it, I created a menu with the ul tag. This would be the home screen. I also created another file called 'cadastro.blade.php', which would be the registration screen. By clicking on a link, which is in this 'Welcome.blade.php' menu (the tag to), i would like the user to be directed to the 'registration.blade.php' page. I know that in 'Routes/web.php', there are the paths of the routes, but I don’t really know how to make it fit. For example, I would like that when accessing the route '/registration', I was able to go to the page 'cadastro.blade.php'. However, when I try this, it just appears 'Not found'. I’m sorry about the mistakes, like I said, I don’t really know how it works.
My code in 'Welcome.blade.php' (just a simple link):
<label class="nome"> CADASTRO </label>
<ul>
<li>
<hr>
<a href="#">
<span class="titulo"> Pré-cadastro de paciente </span>
</a>
</li>
</ul>
My code in 'Routes/web.app':
Route::get('/', function () {
return view('welcome');
});
Route::get('/pre-cadastro', 'PacientesController@create');
My 'Patientscontroller'':
class PacientesController extends Controller
{
public function create(){
return view('cadastro');
}
}
Thank you.