“rute Laravel 8” Kode Jawaban

Membuat rute dasar di Laravel 8

use App\Http\Controllers\PagesController;

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

Laravel Route Namespace dan awalan

Route::prefix('admin')->group(function () {
    Route::get('/users', function () {
        // Matches The "/admin/users" URL
    });
});
Perfect Plover

rute Laravel 8

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

Laravel 8 Rute Namespace

 Route::group(['namespace' => 'App\Http\Controllers', 'prefix' => 'admin',
 'as' => 'admin.', 'middleware' => ['auth:sanctum', 'verified']], function()
{
    Route::get('/dashboard', ['DashboardController', 'index']);
});
Lokesh003

Laravel Rute Match

Route::match(['get', 'post'], '/', function () {
    //
});

Route::any('/', function () {
    //
});
Alberto Peripolli

rute () dan dengan () di Laravel

Route::get('user/{id}/profile', function ($id) {
    //
})->name('profile');

$url = route('profile', ['id' => 1, 'photos' => 'yes']);

// /user/1/profile?photos=yes
Lucky Loris

Jawaban yang mirip dengan “rute Laravel 8”

Pertanyaan yang mirip dengan “rute Laravel 8”

Lebih banyak jawaban terkait untuk “rute Laravel 8” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya