laravel create controller
php artisan make:controller MyController
laravel create controller
php artisan make:controller MyController
create controller laravel with model
php artisan make:controller ProductController --model=Product
Route::resource
Route::resource('photos', PhotoController::class);
laravel controllers
<?php
namespace AppHttpControllers;
use AppUser;
use AppHttpControllersController;
class UserController extends Controller
{
/**
* Show the profile for the given user.
*
* @param int $id
* @return Response
*/
public function show($id)
{
return view('user.profile', ['user' => User::findOrFail($id)]);
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us