I am trying to create a new blade.php page, I need to access this page by pressing a button on my home page, but it isn’t working properly.
How can I do it?
I tried doing
Route::get('/my-page', function () { return view('my-page'); });
inside web.php, it works, but when I press the card button, it doesn’t work
`
<div class="col-lg-4 col-md-4 col-sm-4 my-1">
<a href="{{ route('course-page') }}">
<div class="card card-animated text-center py-5">
<span class="">
<img class="img-fluid" src="assets/image/courses.svg" >
</span>
<div class="card-body">
<p class="card-text">COURSES</p>
</div>
</div>
</a>
</div>
2
Answers
You are trying to get a route by route name while you did not define the route name. Add a name for your route:
Try this,
Change in web.php
Welcome in advance.