{"id":19606757,"url":"https://github.com/learnwithfair/laravel-documentation","last_synced_at":"2025-07-25T10:33:46.352Z","repository":{"id":239054509,"uuid":"798368095","full_name":"learnwithfair/laravel-documentation","owner":"learnwithfair","description":"laravel-documentation with [learnwithfair, Learn with fair, Rahatul Rabbi, Md Rahatul Rabbi ,rahatulrabbi]","archived":false,"fork":false,"pushed_at":"2025-05-01T08:28:08.000Z","size":49076,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-01T09:33:02.844Z","etag":null,"topics":["documentation","laravel","laravel-documentation","learn-with-fair","learnwithfair","rahatul-rabbi","rahatulrabbi","web-development"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/learnwithfair.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-09T16:30:07.000Z","updated_at":"2025-05-01T08:28:13.000Z","dependencies_parsed_at":"2025-01-09T09:34:14.382Z","dependency_job_id":null,"html_url":"https://github.com/learnwithfair/laravel-documentation","commit_stats":null,"previous_names":["learnwithfair/laravel-documentation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/learnwithfair/laravel-documentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnwithfair%2Flaravel-documentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnwithfair%2Flaravel-documentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnwithfair%2Flaravel-documentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnwithfair%2Flaravel-documentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/learnwithfair","download_url":"https://codeload.github.com/learnwithfair/laravel-documentation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnwithfair%2Flaravel-documentation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266991021,"owners_count":24017732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","laravel","laravel-documentation","learn-with-fair","learnwithfair","rahatul-rabbi","rahatulrabbi","web-development"],"created_at":"2024-11-11T10:07:06.953Z","updated_at":"2025-07-25T10:33:46.308Z","avatar_url":"https://github.com/learnwithfair.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# LARAVEL-RESTAURANT\n\n[![Youtube][youtube-shield]][youtube-url]\n[![Facebook][facebook-shield]][facebook-url]\n[![Instagram][instagram-shield]][instagram-url]\n[![LinkedIn][linkedin-shield]][linkedin-url]\n\nThanks for visiting my GitHub account!\n\n\u003cimg src =\"https://static-00.iconduck.com/assets.00/laravel-icon-1990x2048-xawylrh0.png\" height = \"200px\" width = \"200px\"/\u003e **Laravel** is a free and open-source PHP- based web framework for building high-end web applications. It was created by Taylor Otwell and intended for the development of web applications following the model–view–controller architectural pattern and based on Symfony. [see-more](https://laravel.com/docs/)\n\n|                                |\n| :----------------------------: |\n| ![laravel](images/laravel.png) |\n\n### [Code-Example](https://github.com/learnwithfair/laravel-restaurant)\n\n## Source Code (Download)\n\n- [Documentation](https://mega.nz/folder/RGFiUApD#PoKIVCwF8IkQhE2PHw1XxQ)\n- [See-More](https://github.com/mnishihan/laravel-docs-in-pdf)\n\n## Required Software (Download)\n\n- VS Code, Download -\u003ehttps://code.visualstudio.com/download\n- XAMPP ,Download -\u003e https://www.apachefriends.org/download.html\n- Composer ,Download (Composer-Setup.exe) -\u003e https://getcomposer.org/download/\n- Nodejs ,Download -\u003e https://nodejs.org/en/download\n\n## Laravel Roadmap\n\n|                                                 |                                                 |\n| :---------------------------------------------: | :---------------------------------------------: |\n|                Laravel Framework                |                MVC Architecture                 |\n| ![roadmap](images/Laravel-Framework-banner.jpg) | ![roadmap](images/laravel-mvc-architecture.png) |\n\n## React with Laravel\n- https://skillhost.in/how-to-use-react-js-with-laravel/\n\n## Create Laravel Project\n\n- Step-1: Run the command in the cmd\n\n```cmd\ncomposer create-project laravel/laravel projectName\n\nor,\ncomposer global require laravel/installer\nlaravel new projectName\n```\n\nStep-2: **Connect Database**\n\n- In the .env file change the configuration as-\n\n```cmd\nDB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=DatabaseName\nDB_USERNAME=root\nDB_PASSWORD=\n```\n\n- For Send Mail\n\n  - Create a Mailtrap account using path -\u003e https://mailtrap.io/\n  - Get the username \u0026 password from Mailtrap account using path -\u003ehttps://mailtrap.io/inboxes/2087677/settings\n  - Set up .env file as-\n\n  ```cmd\n  MAIL_MAILER=smtp\n  MAIL_HOST=sandbox.smtp.mailtrap.io\n  MAIL_PORT=2525\n  MAIL_USERNAME=YourUserName\n  MAIL_PASSWORD=YourPassword\n  MAIL_ENCRYPTION=tls\n  MAIL_FROM_ADDRESS=\"yourEmailAddress\"\n  MAIL_FROM_NAME=\"${APP_NAME}\"\n  ```\n\n- Create data table write the command in cmd\n\n```cmd\nphp artisan migrate\n```\n\n- Note: If it's not working correctly then following the s\n\n  - Manually, Create the desired database in the path -\u003e `http://localhost/phpmyadmin/`\n  - Or Create database using cmd as-\n\n    - Set up the Environment variabel `C:\\xampp\\mysql\\bin`\n    - Write the command in the cmd\n\n    ```cmd\n    mysql -u root -p (password: Not Used)\n    create database DatabaseName; (semicolon must be add in the end)\n    show databases;\n    exit;\n    ```\n\n    - Again run the command in the cmd as-\n\n    ```cmd\n    php artisan migrate\n    ```\n\nStep-3: **For Run Project**\n\n- Start the Xampp server\n- Run command in the root directory `php artisan serve`\n- Run command (Another CMD) in the root directory `npm run dev` (Optional)\n- Visit path -\u003e http://127.0.0.1:8000/\n\n[See-more](https://laravel.com/docs/)\n\n## Documentation\n\n---\n\n    \t\t\t\tLaravel Tutorial\n\n---\n\n### 01. Required Software for Laravel Project\n\n1. xampp\n2. Composer.\n3. node.js (For React js)\n4. JSON Formatter Extension (For dd format)\n\n### 02. Create Laravel Project\n\n- =\u003e Command:\n\n```cmd\ncomposer create-project laravel/laravel project-name\n           Or, laravel new project-name\n```\n\n- =\u003e For creating Registration and login in Laravel\n\n```cmd\n(i) composer require laravel/jetstream\n(ii) php artisan jetstream:install livewire\n```\n\n- =\u003e For importing react js in Laravel\n\n```cmd\n(i) composer require laravel/ui\n(ii) php artisan ui react / php artisan ui react --auth (with auth)\n(iii) npm install\n(iv) npm run dev\n```\n\n### 03. Start Laravel Project\n\n- =\u003e Command: `php artisan serve`\n\n### 04. Open Project by vs code\n\n- =\u003e Command: `code .`\n\n### 05. Check Version\n\n- =\u003e Command:\n\n```cmd\n(i) php artisan --version (For Laravel)\n(ii) php -v (For php)\n(iii) composer -v (For composer)\n(iv) node -v (For node.js)\n```\n\n### 06. Create Virtual Host:\n\n1. Go to the `\\xampp\\apache\\conf\\extra\\httpd-vhosts.conf` file\n\n   - =\u003e Code:\n\n   ```cmd\n   1.\u003cVirtualHost \\*:80\u003e\n    DocumentRoot \"project path\"\n   ServerName hostName (Ex-laravel.com)\n   \u003c/VirtualHost\u003e\n   ```\n\n2. Go to the `C:\\Windows\\System32\\drivers\\etc\\hosts` file\n\n   - =\u003e Code:\n\n   ```cmd\n   127.0.0.1 hostName (Edit with run as administrator)\n   ```\n\n### 07. File Placement\n\n1.  CSS, JS, Image place in the `public` folder.\n2.  php file store in the `Resources/View` folder.\n3.  Controller file place in the `app/Http/Controllers` folder.\n\n- =\u003e FileName: Example of controlelr name `CategoryController`.\n- =\u003e Used: Controller file used for `Route control`.\n- =\u003e Code: `get/put/update/delete` etc method create.\n- =\u003e Command:\n- `php artisan make:controller ControllerName` (With Manually).\n- `php artisan make:controller ControllerName invokable` (With 1 method).\n- `php artisan make:controller ControllerName --resource` (With 7 method).\n\n4.  Request file place in the `app/Http/Requests` folder.\n\n- =\u003e FileName: Example of Request file name CategoryController\n- =\u003e Used: Request file mainly used for form validation.\n- =\u003e Code: public function{return true;}\n  and use function rules(For set requirement/required),\n  messages(For set custom message),attributes(For change default value).\n- =\u003e Command: `php artisan make:request RequestName`.\n\n5.  Model file place in the `app/Http/Models` folder.\n\n    - =\u003e FileName: Example of Model file name Category.(usualy single and singular).\n    - =\u003e Used: Model file mainly used for connect database.\n    - =\u003e Code: should be used \"protected $fillable = ['name','description',...];\"\n    - =\u003e Command: `php artisan make:model ModelName`.\n\n6.  Migration file place in the `database/migrations` folder.\n\n    - =\u003e FileName: Example of Model file name create*file_name_table.(used small letter and separate by *).\n    - =\u003e Used: Model file mainly used for create data table.\n    - =\u003e Code: use nullable() property.\n    - =\u003e Command: `php artisan make:migration create_file_name_table`.\n\n7.  Combine Command For `Model, Migration \u0026 Controller` with resource.\n\n    - =\u003e Command: `php artisan make:model ModelName -mcr`\n\n8.  Route documents place in the `routes/web.php` File.\n\n    - =\u003e Used: Route file mainly used for move one page to another page.\n    - =\u003e Code: Route::get( '/', function () { return view( 'welcome' ); } );\n      - Route::get( 'url/{id,name}', [ControllerName::class, 'functionName'] ); (Using controller and (id, name) is passing value by url ).\n      - Route::resource( 'url', ControllerName::class ); (Resource automatically call function).\n      - Route::get( 'url/{id,name}', [ControllerName::class, 'functionName'] ) -\u003ename('folder.fileName');(For Name Route)\n      - Route::prefix('prefixText') -\u003econtroller(ControllerName::class) -\u003egroup(function(){Route::get('url','functionName')});(For prefix and Grouping Route)\n    - =\u003e Method: get/post(for form submit)/PUT(For Update)/PATCH/DELETE(For Delete).\n    - =\u003e Command: `php artisan route:list`\n\n9.  Component \u0026 slot file place in the `resource/view/components` folder.\n\n    - =\u003e FileName: Example of components file name header.blade.php.(used small letter and separate by \\_).\n    - =\u003e Used: Component file mainly used for reuseable code.\n    - =\u003e Code:\n    - -\u003e **Option -01**\n\n```php\n \u003ch3\u003eThis code place in the component file.\u003c/h3\u003e\n \u003cx-fileName\u003e\u003c/x-fileName\u003e(For display)\n```\n\n- -\u003e **Option -02** (default component with value passing)\n\n```php\n\u003ch3\u003e{{ $slot }}\u003c/h3\u003e This code place in the component file.\n\u003cx-fileName\u003e\u003c/x-fileName\u003e.(For display)\n```\n\n- -\u003e **Option -03** (Name componet with value passing)\n\n```php\n\u003ch3\u003e{{ $componentName }}\u003c/h3\u003e This code place in the component file.\n\u003cx-fileName:componentName\u003e\u003c/x-fileName\u003e.(For display)\n\n```\n\n- =\u003e Command: `php artisan make:component file_name`.\n\n10. Custom error page place in the `resource/view/errors` folder.\n\n- -\u003e **Option -01**\n\n- =\u003e FileName: Example of error page name `404.blade.php`\n  - -\u003e **Option -02** (All errors page automatically created)\n- =\u003e Command: `php artisan vendor:publish --tag=laravel-errors`\n\n11. Extra Component such as- (Illuminate database, fakerphp, phroute, database seeder).\n\n### 08. For database create.\n\n- =\u003e Command: (using cmd)\n\n```cmd\n(i) Set up Environment variabel `C:\\xampp\\mysql\\bin`\n(ii) mysql -u root -p (password: Not Used)\n(iii) create database restaurant;\n(iv) show databases;\n(v) exit;\n```\n\n### 09. For data table create.\n\n- =\u003e Command: `php artisan migrate`\n  - `php artisan migrate:rollback` (For delete column/data table from database)\n\n### 10. For connect database go to .env file\n\n- =\u003e Code: `DB_DATABASE=database_name`\n\n### 11. Insert data using cmd\n\n- =\u003e Command:\n\n```php\n  (i) php artisan tinker\n  (ii) DB::table('tableName') -\u003einsert([\"name\"=\u003e\"MD RAHATUL RABBI\",\"email\" =\u003e\"rahatul@gmail.com\",\"password\"=\u003ebcrypt(\"rahatul\")]);(For Insert values in the data table)\n  (iii) DB::table('tableName') -\u003eget(); (For Display)\n  (iv) exit()\n```\n\n### 12. File extention\n\n1. For raw php file use .php extention.\n2. For laravel php file use `.blade.php` extention. write code with `{{ }}`\n3. layout file name start with `_` line. Ex- `_master.blade.php`\n\n### 13. Code\n\n---\n\n    \t\t\t\tCode\n\n---\n\n1. For `Form`\n\n   - =\u003e Code:\n\n```php\n   (i) @csrf\n   (ii) @method('DELETE/PUT') (For delete or Update)\n   (iii) bcrypt('password'); (For secure password like as md5())\n   (iv) CKEDITOR, Summernote\n   (v) $image = $request -\u003eslider_img;\n $imageName = time() . '.' . $image -\u003egetClientOriginalExtension();\n $request-\u003eslider_img -\u003emove( 'uploads/slider', $imageName );\n $data['image'] = $imageName;\n```\n\n2. For `Insert/Show/Update/Edit/Delete` using Model\n\n   - =\u003e Code: (For Display ) ----------------------------------------------\n     dd( $request -\u003eall() ); (For check data)\n\n   - -\u003e Option -01\n\n   ```php\n    $data['categories'] = ModelName::all();\n    return view( 'folderName.fileName', $data );\n   ```\n\n   - -\u003e Option -02\n\n   ```php\n    $categories = ModelName::all();\n    return view( 'folderName.fileName', ['categories'  =\u003e $categories] );\n   ```\n\n   - -\u003e Option -03\n\n   ```php\n     $categories =ModelName::all();\n     return view( 'folderName.fileName', compact( 'categories' ) );\n   ```\n\n   - =\u003e Code: (For Store) ------------------------------------------------\n\n     name and description are input's name in the form\n\n   - -\u003e Option -01\n\n   ```php\n     $data['tableColumnName'] = $request -\u003ename;\n     $data['tableColumnName'] = $request -\u003edescription;\n     ModelName::create( $data );\n    return back();\n   ```\n\n   - -\u003e Option -02\n\n   ```php\n     ModelName::create( [\n     'tableColumnName'  =\u003e $request -\u003ename,\n     'tableColumnName'  =\u003e $request -\u003edescription,\n     ] );\n   ```\n\n   - =\u003e Code: (For display single data) ------------------------------------------------\n\n     - -\u003e Option -01\n\n     ```php\n      $data['category'] = $parameterName;\n      return view( 'folderName.fileName', $data );\n     ```\n\n   - -\u003e Option -02\n\n   ```php\n    return view( 'folderName.fileName', ['category'  =\u003e $parameterName] );\n   ```\n\n   - -\u003e Option -03\n\n   ```php\n    return view( 'folderName.fileName', compact( 'parameterName' ) );\n   ```\n\n   - =\u003e Code: (For display Edit Fill data) ------------------------------------------------\n\n     - -\u003e Option -01\n\n   ```php\n      $data['category'] = $parameterName;\n      return view( 'folderName.fileName', $data );\n   ```\n\n   - -\u003e Option -02\n\n   ```php\n    return view( 'folderName.fileName', ['category'  =\u003e $parameterName] );\n   ```\n\n   - -\u003e Option -03\n\n   ```php\n    return view( 'folderName.fileName', compact( 'parameterName' ) );\n   ```\n\n   - =\u003e Code: (For Update data) ------------------------------------------------\n     name and description are input's name in the form\n\n   - -\u003e Option -01\n\n   ```php\n    $data['tableColumnName'] = $request -\u003ename;\n    $data['tableColumnName'] = $request -\u003edescription;\n    $parameterName -\u003eupdate( $data );\n    return redirect() -\u003eroute( 'folderName.fileName' );\n   ```\n\n   - -\u003e Option -02\n\n   ```php\n    $parameterName -\u003eupdate( [\n    'tableColumnName'  =\u003e $request -\u003ename,\n    'tableColumnName'  =\u003e $request -\u003edescription,\n    ] );\n    return redirect() -\u003eroute( 'folderName.fileName' );\n   ```\n\n   - -\u003e Option -03\n\n   ```php\n    ModelName::where( 'id', $parameterName -\u003eid ) -\u003eupdate( [\n    'tableColumnName'  =\u003e $request -\u003ename,\n    'tableColumnName'  =\u003e $request -\u003edescription,\n    ] );\n   ```\n\n   - =\u003e Code: (For Delete data) ------------------------------------------------\n\n   ```php\n    $parameterName -\u003edelete();\n   ```\n\n3. For `Insert/Show/Update/Edit/Delete` using DB\n\n   - =\u003e Code: (For Display ) ----------------------------------------------\n     `dd( $request -\u003eall() );` (For check data)\n   - -\u003e Option -01\n\n   ```php\n    $data['categories'] = DB::table( 'TableName' ) -\u003eget();\n    return view( 'folderName.fileName', $data );\n   ```\n\n   - -\u003e Option -02\n\n   ```php\n    $categories = DB::table( 'TableName' ) -\u003eget();\n    return view( 'folderName.fileName', ['categories'  =\u003e $categories] );\n   ```\n\n   - -\u003e Option -03\n\n   ```php\n     $variableName = DB::table( 'TableName' ) -\u003eget();\n     return view( 'folderName.fileName', compact( 'variableName' ) );\n   ```\n\n   - =\u003e Code: (For Store) ------------------------------------------------\n     name and description are input's name in the form\n\n     - -\u003e Option -01\n\n     ```php\n      $data['tableColumnName'] = $request -\u003ename;\n      $data['tableColumnName'] = $request -\u003edescription;\n      DB::table( 'TableName' ) -\u003einsert( $data );\n      return back();\n     ```\n\n   - -\u003e Option -02\n\n   ```php\n    DB::table( 'TableName' ) -\u003einsert([\n    'tableColumnName'  =\u003e $request-\u003ename,\n    'tableColumnName' =\u003e $request -\u003edescription,\n    ] );\n   ```\n\n   - =\u003e Code: (For display single data) ------------------------------------------------\n\n     - -\u003e Option -01\n\n     ```php\n      $data['category'] = DB::table( 'TableName' ) -\u003ewhere( 'id', $id ) -\u003efirst();\n      return view( 'folderName.fileName', $data );\n     ```\n\n   - -\u003e Option -02\n\n   ```php\n    return view( 'folderName.fileName', ['category'  =\u003e DB::table( 'TableName' ) -\u003ewhere( 'id', $id )-\u003efirst()] );\n   ```\n\n   - -\u003e Option -03\n\n   ```php\n    $variableName['category'] = DB::table( 'TableName' )-\u003ewhere( 'id', $id ) -\u003efirst();\n    return view( 'folderName.fileName', compact( 'variableName' ) );\n   ```\n\n   - =\u003e Code: (For display Edit Fill data) ------------------------------------------------\n     - -\u003e Option -01\n     ```php\n      $data['category'] = DB::table( 'TableName' ) -\u003ewhere( 'id', $id ) -\u003efirst();\n      return view( 'folderName.fileName', $data );\n     ```\n   - -\u003e Option -02\n\n   ```php\n    return view( 'folderName.fileName', ['category'  =\u003e DB::table( 'TableName' ) -\u003ewhere( 'id', $id )-\u003efirst();] );\n   ```\n\n   - -\u003e Option -03\n\n   ```php\n    $variableName['category'] = DB::table( 'TableName' ) -\u003ewhere( 'id', $id ) -\u003efirst();\n    return view( 'folderName.fileName', compact( 'variableName' ) );\n   ```\n\n   - =\u003e Code: (For Update data) ------------------------------------------------\n     name and description are input's name in the form\n\n     - -\u003e Option -01\n\n     ```php\n      $data['tableColumnName'] = $request -\u003ename;\n      $data['tableColumnName'] = $request -\u003edescription;\n      DB::table( 'TableName' ) -\u003ewhere( 'id', $id ) -\u003eupdate( $data );\n      return redirect() -\u003eroute( 'folderName.fileName' );\n     ```\n\n   - -\u003e Option -02\n\n   ```php\n    DB::table( 'TableName' ) -\u003ewhere( 'id', $id ) -\u003eupdate( [\n    'tableColumnName'  =\u003e $request -\u003ename,\n    'tableColumnName'  =\u003e $request -\u003edescription,\n    ] );\n   ```\n\n   - =\u003e Code: (For Delete data) ------------------------------------------------\n\n     `DB::table( 'TableName' ) -\u003ewhere( 'id', $id ) -\u003edelete();`\n\n### 14. Form Validation\n\n- =\u003e Code: ------------------------------------------------\n\n  - -\u003e Option -01\n    Form validation\n\n    ```php\n    $request -\u003evalidate( [\n    'inputName'  =\u003e 'required|max:255',\n    'inputName'  =\u003e 'required',\n    ], [\n    'inputName.required'  =\u003e \"Name must be filled up!\",\n    'inputName.required'  =\u003e \"Description filled must be required!\",\n    ] );\n    ```\n\n  - -\u003e Option -02 (Using Class)\n    ```php\n          public function store( CategoryFormRequest $request ){\n               $request -\u003evalidated();\n           }\n    ```\n\nIn the request class that place in the `app/http/Requests` initialized function as-\n`authorize(return true),rules(set required condition),messages(set custom message),attributes(change default message)`\n\n- =\u003e Display message: ------------------------------------------------\n\n```php\n @error('name')\n {{ $message }}\n @enderror\n```\n\n### 15. Set/get session/ alert\n\n- =\u003e Code: (For set) ------------------------------------------------\n\n  - -\u003e Option -01\n\n  ```php\n   session() -\u003eflash( 'success', \"Messages\" );\n   return redirect() -\u003eroute( 'folderName.fileName' );\n  ```\n\n  - -\u003e Option -02\n\n  ```php\n             Session::flash( 'warning', \"Messages\" );\n             return redirect() -\u003eroute( 'folderName.fileName' );\n  ```\n\n  - -\u003e Option -03\n    ```php\n          return redirect() -\u003eroute( 'folderName.fileName' ) -\u003ewith( 'success', \"danger\" );\n    ```\n\n- =\u003e Code: (For get) ------------------------------------------------\n  - -\u003e Option -01\n  ```php\n   @if (session('success'))\n   {{ session('success') }}\n   @endif\n  ```\n  - -\u003e Option -02\n  ```php\n   @if (session() -\u003ehas('success'))\n   {{ session() -\u003eget('success') }}\n   @endif\n  ```\n  - -\u003e Option -03\n  ```php\n   @if (Session::has('success'))\n   {{ session() -\u003eget('success') }}\n   @endif\n  ```\n  - -\u003e Option -04 (For together print)\n\n```php\n    @foreach ($errors -\u003eall() as $error )\n\u003cli\u003e{{ $error }}\u003c/li\u003e\n@endforeach\n```\n\n### 16. Method of Laravel\n\n- (i) @include('folderName.fileName') (Full page include without @yield)\n- (ii) @extends('folderName.fileName') (Full page include with @yield)\n- (iii) @yield('title')\n- (iv) @section('title') @endsection\n- (v) route('folderName.fileName') (For URL)\n- (vi) asset('path') (For css/js/image link)\n\n### 17. Conditional statment and loop in Laravel\n\n- (i) @if ........@endif\n- (ii) @foreach (variableName that through in the Control file as $valiableName) -- $valiableName -\u003ekeyName --- @endforeach\n\n### 18. cache clear\n\n- -\u003e Option -01 (For Localhost)\n\n- =\u003e Command: `php artisan optimize:clear`\n\n- -\u003e Option -02 (For Live Server)\n\n- =\u003e Code: (Place in the web.php file)------------------------------------------------\n  ```php\n  Route::get( '/clear', function () {\n  Artisan::call( 'optimize:clear' );\n  return \"\n  events ..... DONE \u003c/br\u003e\n  views .......DONE \u003c/br\u003e\n  cache ...... DONE \u003c/br\u003e\n  route .......DONE \u003c/br\u003e\n  config ......DONE \u003c/br\u003e\n  compiled ....DONE \u003c/br\u003e\n  \";\n  } );\n  ```\n\n## VS code Extention\n\n- Laravel Blade Snippets\n- Laravel Snippets\n- Laravel Artisan\n- Laravel goto view\n- Laravel Extra intellisense\n- Laravel goto components\n- Laravel Blade spacer\n- php debug\n- php Namespace\n- phpcs\n- php DocBlocker\n- PHPDoc Comment\n- database client\n- Community material theme\n- VS code great icon\n- code Runner\n- Code Spell checker\n- Auto import\n- Beautify\n- gettter \u0026 setter generator\n- Mithrill Emmet\n\n## VS Code json file\n\n```json\n{\n  \"workbench.colorTheme\": \"Default High Contrast\",\n  \"files.autoSave\": \"onFocusChange\",\n  \"LaravelExtraIntellisense.basePathForCode\": \"\\\"LaravelExtraIntellisense.customValidationRules\\\": {     \\\"mobile\\\": \\\"mobile\\\",     \\\"distance_gt\\\": \\\"distance_gt:${0:1km}\\\" }\",\n  \"vsicons.dontShowNewVersionMessage\": true,\n  \"phpfmt.php_bin\": \"\\\"E:\\\\phpproject\\\\php\\\\php.exe\\\"\",\n  // \"phpfmt.php_bin\": \"\\\"C:\\\\Program Files\\\\php\\\\php.exe\\\"\",\n  \"[php]\": {\n    \"editor.formatOnSave\": true,\n    \"editor.defaultFormatter\": \"kokororin.vscode-phpfmt\"\n  },\n  \"phpfmt.passes\": [\n    \"PSR2KeywordsLowerCase\",\n    \"PSR2LnAfterNamespace\",\n    \"PSR2CurlyOpenNextLine\",\n    \"PSR2ModifierVisibilityStaticOrder\",\n    \"PSR2SingleEmptyLineAndStripClosingTag\",\n    \"ReindentSwitchBlocks\",\n    \"AddMissingParentheses\",\n    \"AlignDoubleArrow\",\n    \"AlignDoubleSlashComments\",\n    \"AlignEquals\",\n    \"AlignGroupDoubleArrow\",\n    \"AlignPHPCode\",\n    \"SpaceBetweenMethods\",\n    \"SpaceAroundParentheses\"\n  ],\n  \"phpfmt.exclude\": [\n    \"ReindentComments\",\n    \"StripNewlineWithinClassBody\",\n    \"AllmanStyleBraces\"\n  ],\n  \"phpfmt.psr2\": false,\n  \"php.validate.executablePath\": \"\",\n  \"php.debug.executablePath\": \"\\\"C:\\\\Program Files\\\\php\\\\php.exe\\\"\",\n  \"workbench.iconTheme\": \"vscode-great-icons\",\n  \"editor.formatOnSave\": true\n}\n```\n\n\n### Enable debug mood in development \n````env\nAPP_ENV=local\nAPP_DEBUG=true\n````\n\n### Install package\n````bash\ncomposer require barryvdh/laravel-debugbar --dev\nphp artisan vendor:publish --provider=\"Barryvdh\\Debugbar\\ServiceProvider\"\n````\n\n## Follow Me\n\n[\u003cimg src='https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/github.svg' alt='github' height='40'\u003e](https://github.com/learnwithfair) [\u003cimg src='https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/facebook.svg' alt='facebook' height='40'\u003e](https://www.facebook.com/learnwithfair/) [\u003cimg src='https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/instagram.svg' alt='instagram' height='40'\u003e](https://www.instagram.com/learnwithfair/) [\u003cimg src='https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/twitter.svg' alt='twitter' height='40'\u003e](https://www.twiter.com/learnwithfair/) [\u003cimg src='https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/youtube.svg' alt='YouTube' height='40'\u003e](https://www.youtube.com/@learnwithfair)\n\n \u003c!-- MARKDOWN LINKS \u0026 IMAGES  --\u003e\n\n[youtube-shield]: https://img.shields.io/badge/-Youtube-black.svg?style=flat-square\u0026logo=youtube\u0026color=555\u0026logoColor=white\n[youtube-url]: https://youtube.com/@learnwithfair\n[facebook-shield]: https://img.shields.io/badge/-Facebook-black.svg?style=flat-square\u0026logo=facebook\u0026color=555\u0026logoColor=white\n[facebook-url]: https://facebook.com/learnwithfair\n[instagram-shield]: https://img.shields.io/badge/-Instagram-black.svg?style=flat-square\u0026logo=instagram\u0026color=555\u0026logoColor=white\n[instagram-url]: https://instagram.com/learnwithfair\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://linkedin.com/company/learnwithfair\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearnwithfair%2Flaravel-documentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flearnwithfair%2Flaravel-documentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearnwithfair%2Flaravel-documentation/lists"}