Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to make and pass model to resource controller in laravel

// run this command in terminal
php artisan make:controller PostController --resource --model=Post
// place this in web.php (route file)
Route::resource('posts', PostController::class);
 
PREVIOUS NEXT
Tagged: #pass #model #resource #controller #laravel
ADD COMMENT
Topic
Name
2+5 =