{"id":16283474,"url":"https://github.com/damiansuess/learn.laravel","last_synced_at":"2026-02-13T23:06:27.792Z","repository":{"id":238176408,"uuid":"796032041","full_name":"DamianSuess/Learn.Laravel","owner":"DamianSuess","description":"Learn how to use Laravel 11 through small example apps","archived":false,"fork":false,"pushed_at":"2025-07-21T13:11:23.000Z","size":797,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-14T06:33:23.556Z","etag":null,"topics":["laravel","learn","learn-laravel","php","sql","suesslabs","xeno-innovations"],"latest_commit_sha":null,"homepage":"https://suesslabs.com","language":"PHP","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/DamianSuess.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-04T18:19:35.000Z","updated_at":"2025-05-15T02:48:57.000Z","dependencies_parsed_at":"2024-10-27T21:41:45.679Z","dependency_job_id":"9d1f694a-a1d9-4911-a741-356481bea4b2","html_url":"https://github.com/DamianSuess/Learn.Laravel","commit_stats":null,"previous_names":["damiansuess/learn.laravel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DamianSuess/Learn.Laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DamianSuess%2FLearn.Laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DamianSuess%2FLearn.Laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DamianSuess%2FLearn.Laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DamianSuess%2FLearn.Laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DamianSuess","download_url":"https://codeload.github.com/DamianSuess/Learn.Laravel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DamianSuess%2FLearn.Laravel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29422407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T22:20:51.549Z","status":"ssl_error","status_checked_at":"2026-02-13T22:20:49.838Z","response_time":78,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["laravel","learn","learn-laravel","php","sql","suesslabs","xeno-innovations"],"created_at":"2024-10-10T19:13:31.971Z","updated_at":"2026-02-13T23:06:27.652Z","avatar_url":"https://github.com/DamianSuess.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learn Laravel 11\n\nIn this edition of the Suess Labs' Learn repository, we'll dive into the Laravel PHP framework for web applications.\n\nAuthor: [Damian Suess](https://www.linkedin.com/in/damiansuess/)\u003cbr /\u003e\nWebsite: [suesslabs.com](https://suesslabs.com)\n\n## Quick-Start Running Samples\n\n1. Open a project\n2. Rename, `.env.example` as `.env`\n3. Install/reload packages (`composer install`)\n4. Run database migrations and generate keys\n5. Run the project (`php artisan serve`)\n\n```sh\ncomposer install\ncp .env.example .env\nphp artisan migrate\nphp artisan key:generate\nphp artisan serve\n```\n\n## Overview\n\nThe following projects dive into the basics and customization of Laravel.\n\n\u003e ### Foreword\n\u003e Looking back, I've usually always created custom micro-frameworks with PHP to keep things lean, quick, and target a project's needs. However, there are a few bottlenecks that can come of that. Namely, _rapid prototyping, maintainability, and scalability_ can quickly pinch points throughout a product's lifecycle. As a consideration, frameworks like **Laravel** can assist with such things.\n\u003e\n\u003e By all means, explore and build your frameworks! This will teach you a lot of solid fundamentals, especially the core functionality of PHP.\n\n### Guides\n\n| File | Description |\n|-|-|\n| [laravel-terminology.md](laravel-terminology.md) | New to Laravel? Check out the doc to understand the folder structures and terminology used. |\n| [install-guide.md](install-guide.md) | Quick-start guide to installing PHP, Laravel, Xdebug, Composer, etc. |\n| [debugging.md](debugging.md) | How to debug your project using VS Code basics |\n\n### Clearing Cache\n\nThe following commands are used to clear the cache\n\n```sh\nphp artisan cache:clear\nphp artisan route:clear\nphp artisan config:clear\nphp artisan view:clear\n```\n\nFor a deeper clean, delete the folder, `/vendor/` (60 MB).\n\nAfter doing so, you will need to execute `composer install` to reload the packages.\n\n### PascalCase\n\nIn the PascalCase sample projects the following mottos are applied:\n\n\u003e 1) The projects using **PascalCase** are an example of overriding Laravel's default naming conventions. In reality, most organizations have their own (_legacy_) conventions. As an example, variable names such as it be `passwd` vs. `password`, `userName` vs. `name`, or `rememberToken` instead of `remember_token`.\n\u003e\n\u003e 2) Most samples people provide are a 1-to-1 on the naming, leaning into the Laravel \"_magic glue_\".\n\u003e\n\u003e 3) A framework should be flexible and well-documented to suit the customer's needs. When it's too ridged, copious amounts of scaffolding and code smells will occur.\n\n## Creating a New Laravel Sample Project\n\nThe following uses PHP-CS-Fixer instead of Pint, mostly due to [issue 369](https://github.com/laravel/pint/issues/369).\n\n```sh\n# Create blank project\ncomposer create-project laravel/laravel MyNewApp\n\n# Create project using specific version \"11.*\" or \"11.6\"\ncomposer create-project laravel/laravel SampleLaravel11App 11.*\n\n# Cleanup Code Rules!\n# PINT forces us into 4 spaces (lame)\ncomposer require --dev friendsofphp/php-cs-fixer         \n./vendor/bin/php-cs-fixer fix\n\n# Add DB Migration Script (replace, \"product\", with your name)\n# As a former DBA plural makes me cringe, Laravel likes plural like, \"products\" instead of \"product\"  ):\nphp artisan make:migration create_product_table --create=product\n\n# Run DB Migrations\nphp artisan migrate\n\n# Create new Form Validation class\n# Path: Path: app/Http/Requests/ProductStoreRequest.php\nphp artisan make:request ProductStoreRequest\n\n# Create Controller and Model classes\nartisan make:controller ProductController --resource --model=Product`\n```\n\n### Extensions and More\n\nBefore running a sample project please note the following\n\n1. The `.env` files are not saved by default.\n   * Copy `.env.example` as `.env` before running\n   * Error 500 may occur when the `.env` file is missing.\n2. Run with VS Code and the suggested Extensions\n   1. See, `.vscode/extensions.json` for more info.\n3. Execute, `composer install` to download the Vendor packages.\n4. Execute, `php artisan migrate` to create the database before running\n   * `php artisan migrate:fresh` - Drop tables and recreate\n   * `php artisan migrate:fresh --seed`  - Seed table with test data (_when project states to do so_)\n5. Launch project, `php artisan serve`\n\n## Sample Projects\n\n0. Template Projects\n   1. VS Code Project Template\n   2. Custom Database Naming Convention Template\n1. CRUD - _Basic webpage form with Create, Read, Update, and Delete operations_\n2. Form Validation - _Form submission validator with recall of previously entered values_\n3. REST API Login and CRUD operation - _Including VS Code tester using REST Client extension_\n4. REST API and CRUD - _Slightly more complex implementation of the same thing_\n5. Custom DB Naming Conventions - _Column names using PascalCase and not the gross `snake_case`._\n   1. Pascal Case - Seeder - _DB Factory and Seeder example using your PascalCase columns_\n   2. Pascal Case - API - _Web API for creating \"Customers and Products\"_\n   3. Pascal Case - Filter Results\n   4. Pascal Case - Include Invoice\n   5. Pascal Case - POST PUT PATCH - _Create and Update items_\n   6. Pascal Case - Upload Update - _Massive upload information to store in DB_\n   7. Pascal Case - Unit Testing - _How to test your Custom DB Naming Conventions_\n   8. _Pivot Table - **COMING SOON**_\n6. _Web API Service - **COMING SOON** - Use services to link both View and API logic._\n7. Database - Pivot Table\n\n### Creating a Sample\n\n```sh\ncomposer create-project laravel/laravel #.#-AppName\ncomposer require --dev friendsofphp/php-cs-fixer\n./vendor/bin/php-cs-fixer fix       # Reformats EVERYTHING!\n# ./vendor/bin/php-cs-fixer fix app # Reformats only /app/ folder\n```\n\n## References\n\nThe projects listed here are based on the following examples. The examples in this repository have been modified and improved upon (_bug fixes, added functionality, testability, etc._)\n\n* [REST API Example](https://www.itsolutionstuff.com/post/laravel-11-rest-api-authentication-using-sanctum-tutorialexample.html)\n* [CRUD Example](https://www.itsolutionstuff.com/post/laravel-11-crud-application-example-tutorialexample.html)\n* [Form Validation Example](https://www.itsolutionstuff.com/post/laravel-11-form-validation-example-tutorialexample.html)\n\n### Coming Soon\n\n* Deleting Multiple Records\n* Publish API Route File\n* File Upload Example\n* AJAX Request Example\n* JQuery Ajax Loading Spinner Example\n* Generate and Read Sitemap XML File Example\n* Testing Database with Factory and Seeders\n\n## Debugging Tips\n\nCheckout [debugging.md](debugging.md) for more information\n\n1. `php artisan migrate --pretend`\n   1. Show the migration SQL queries before they're ran\n\n## Naming Conventions\n\nThere are many \"rules\" out there which veer off from one another, however, the following appears to be widely accepted. (_Frankly, I often use Xeno Innovations' legacy rules._)\n\n* Models - Always singular and `PascalCase`\n* Controllers - Usually singular and ending with the word, `Controller`. i.e. `PostController`\n\n## Future Examples\n\n* [Sanctum](https://laravel.com/docs/11.x/sanctum) vs [Passport (OAuth2)](https://laravel.com/docs/11.x/passport)\n  * Sanctum - Lightweight, single page apps, mobile apps, token based APIs.\n  * Passport - OAuth2\n  * Installing:\n    * Sanctum: `php artisan install:api`\n    * Passport: `php artisan install:api --passport`\n* Sail with Docker\n* [LiveWire](https://livewire.laravel.com/) ([GitHub](https://github.com/laravel/livewire-starter-kit))\n  * \"_Building dynamic, reactive, frontend UIs using just PHP._\"\n  * UI with: Tailwindscss, [FluxUI](https://fluxui.dev/) ([github](https://github.com/livewire/flux))\n\n## Other References\n\n* [Database: Query Builder](https://laravel.com/docs/11.x/queries)\n* [Deleting Multiple Records](https://websolutioncode.com/how-to-deleting-multiple-record-in-laravel)\n* [Publish API Route File](https://www.itsolutionstuff.com/post/how-to-publish-api-route-file-in-laravel-11example.html)\n* [File Upload Example](https://www.itsolutionstuff.com/post/laravel-11-file-upload-example-tutorialexample.html)\n* [AJAX Request Example](https://www.itsolutionstuff.com/post/laravel-11-ajax-request-example-tutorialexample.html)\n* [JQuery Ajax Loading Spinner Example](https://www.itsolutionstuff.com/post/laravel-jquery-ajax-loading-spinner-exampleexample.html)\n* [Generate and Read Sitemap XML File Example](https://www.itsolutionstuff.com/post/laravel-11-generate-and-read-sitemap-xml-file-tutorialexample.html)\n* Testing Database with Factory and Seeders - [Blog](https://code.tutsplus.com/how-to-build-a-rest-api-with-laravel-php-full-course--cms-93786t), [Video](https://www.youtube.com/watch?v=YGqCZjdgJJk\u0026t=1045s)\n\n### Example From The Web\n\n* [Loan Application](https://github.com/saddamsegwitz/aspire-loan)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamiansuess%2Flearn.laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamiansuess%2Flearn.laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamiansuess%2Flearn.laravel/lists"}