Answers for "laravel route as"

3

laravel route controller

use App\Http\Controllers\UserController;

Route::get('user/{id}', [UserController::class, 'show']);
Posted by: Guest on November-29-2020
1

laraval routing

use App\Http\Controllers\UserController;
use App\Models\User;

// Route definition...
Route::get('/users/{user}', [UserController::class, 'show']);

// Controller method definition...
public function show(User $user)
{
    return view('user.profile', ['user' => $user]);
}
Posted by: Guest on January-15-2021
1

laraval routing

Route::redirect('/here', '/there', 301);
Posted by: Guest on January-15-2021
0

laraval routing

Route::redirect('/here', '/there');
Posted by: Guest on January-15-2021
0

how to create route in laravel

Route::match(['get', 'post'], '/', function () {
    //
});
Posted by: Guest on May-13-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language