----------------------- Create Laravel Project: ------------------------ https://laravel.com/docs/11.x/installation STEP1: download and setup composer: https://getcomposer.org/download/ STEP2: enter the following command at a new terminal: composer create-project laravel/laravel app1 >cd app1 STEP3: Run Laravel with the following command: >php artisan serve ------------------- Authentication: ------------------- https://www.itsolutionstuff.com/post/laravel-10-bootstrap-auth-scaffolding-tutorialexample.html#google_vignette php artisan migrate:refresh composer require laravel/ui php artisan ui bootstrap npm install npm run dev php artisan ui bootstrap --auth ------------------------ Change Login email to name: Method: Laravel UI -------------------------- Step1: Goto the following file: ----- vendor/laravel/ui/auth-backend/AuthenticatesUsers.php (To quick access: Goto Controllers/LoginController.php and then CTRL+Click on AuthenticatesUsers namespace at the top) At line 155 find username() function: public function username() { return 'name';//Change here } Step2: Goto login.blade.php at views/auth folder ----- change all email to name Ref: https://laraveldaily.com/post/laravel-login-email-username-one-field https://laravel.com/docs/11.x/authentication https://laravel.com/docs/11.x/migrations ---------------------------- Clear all caches in Laravel =========================== php artisan cache:clear php artisan config:clear php artisan event:clear php artisan route:clear php artisan schedule:clear-cache php artisan view:clear php artisan make:controller Api/ProductController --api ------------------ 1. Create Controller: ----------------- php artisan make:controller UserController 2. Create Resource Controller: ------------------------------- php artisan make:controller PhotoController --resource php artisan make:controller PhotoController --model=Photo --resource Configure Resource Controllers at Route: ------------------------------------ Route::resources([ 'photos' => PhotoController::class, 'posts' => PostController::class, ]); Route::resource('photos', PhotoController::class)->only([ 'index', 'show' ]); Route::resource('photos', PhotoController::class)->except([ 'create', 'store', 'update', 'destroy' ]); 3. Create API Controller: php artisan make:controller PhotoController --api Configure Api Resource Controller at Route: ----------------------------------- Route::apiResources([ 'photos' => PhotoController::class, 'posts' => PostController::class, ]); ----------------------- Create your own library ----------------------- Create a Manu_library.php file in your libraries folder and load it up with composer: "autoload": { "classmap": [ ... ], "psr-4": { "App\\": "app/" }, "files": [ "libraries/Manu_library.php" // <---- ADD THIS ] }, After adding that to your composer.json file, run the following command: composer dump-autoload