What is View?
Views contain the HTML served by your application and separate your application logic from your presentation logic. Views are stored in the resources/views directory.
Creating View
resources/views/aboutme.blade.php
Create Route for View
Syntax:-
Route::get(‘uri’, function(){return view(‘view_name’)});
Example:-
Route::get(‘about', function () {
return view(‘aboutme');
});
If your route only needs to return a view, you may use the Route::view method.
Syntax:- Route::view(‘uri’, ‘view_name’);
Example:- Route::view(‘about’, ‘aboutme’)
Latest posts by Amardeep Dubey (see all)
- Remove Duplicate Records from MySQL Server - October 12, 2021
- How to Secure Your Apache Server - September 10, 2021
- Linux security - September 9, 2021