Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Creating a Basic Route in Laravel 8

use AppHttpControllersPagesController;

// Create route for About Page
Route::get('about-us', [PagesController::class, 'aboutPage'])->name('pages.about');
Comment

laravel 8 route

Route::get(
    '/user/profile',
    [UserProfileController::class, 'show']
)->name('profile');
Comment

route list laravel 8

+--------+-----------+-------------------+---------------+---------------------------------------------+--------------+
| Domain | Method    | URI               | Name          | Action                                      | Middleware   |
+--------+-----------+-------------------+---------------+---------------------------------------------+--------------+
|        | GET|HEAD  | api/user          |               | Closure                                     | api,auth:api |
|        | GET|HEAD  | blogs             | blogs.index   | AppHttpControllersBlogController@index   | web          |
|        | POST      | blogs             | blogs.store   | AppHttpControllersBlogController@store   | web          |
|        | GET|HEAD  | blogs/create      | blogs.create  | AppHttpControllersBlogController@create  | web          |
|        | GET|HEAD  | blogs/{blog}      | blogs.show    | AppHttpControllersBlogController@show    | web          |
|        | PUT|PATCH | blogs/{blog}      | blogs.update  | AppHttpControllersBlogController@update  | web          |
|        | DELETE    | blogs/{blog}      | blogs.destroy | AppHttpControllersBlogController@destroy | web          |
|        | GET|HEAD  | blogs/{blog}/edit | blogs.edit    | AppHttpControllersBlogController@edit    | web          |
+--------+-----------+-------------------+---------------+---------------------------------------------+--------------+
Comment

PREVIOUS NEXT
Code Example
Php :: create listener using laravel 
Php :: laravel change foreign key name 
Php :: Sending Data over another website via laravel 
Php :: laravel collection keys 
Php :: php checking if array is multidimensional or not 
Php :: types of controller in laravel 
Php :: push key and value in laravel 
Php :: How to reset phpmyadmin username and password 
Php :: define function parameters php 
Php :: validation error laravel 8 with custom massage 
Php :: erreur php 
Php :: php if mobile 
Php :: get data based on date in laravel 
Php :: redirect compact laravel 
Php :: how to add sidebar to page.php 
Php :: php switch case multiple values per line 
Php :: laravel migration folder 
Php :: route closure function in laravel 
Php :: laravel search user details by specific role 
Php :: laravel 8 check if record exists 
Php :: php artisan tinker send email 
Php :: laravel starter kit installation 
Php :: php select option selected from database 
Php :: phpspreadsheet set cell by column and row 
Php :: array constant in php 
Php :: laravel migration table column nullable 
Php :: laravel blade shorthand if 
Php :: laravel add attribute to model 
Php :: my vscode extension prettier doesnot work for php code 
Php :: php filters 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =