Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

all resource routes laravel 8

use AppHttpControllersBlogController;



Route::get('blogs', '[BlogController::class, 'index']');

Route::get('blogs/create', '[BlogController::class, 'create']');

Route::post('blogs', '[BlogController::class, 'store']');

Route::get('blogs/{blog}/edit', '[BlogController::class, 'edit']');

Route::put('blogs/{blog}', '[BlogController::class, 'update']');

Route::get('blogs/{blog}', '[BlogController::class, 'show']');

Route::delete('blogs/{blog}', '[BlogController::class, 'destroy']');
Source by www.nicesnippets.com #
 
PREVIOUS NEXT
Tagged: #resource #routes #laravel
ADD COMMENT
Topic
Name
9+7 =