Welcome to the blog of Mr.G
Laravel's basic structure follows a clean MVC (Model-View-Controller) pattern, organized in a way that separates logic, presentation, and data. Here's an overview of the default Laravel project structure:
your-project/
├── app/ # Application core code
│ ├── Console/ # Artisan commands
│ ├── Exceptions/ # Error handling
│ ├── Http/ # Controllers, middleware, requests
│ │ ├── Controllers/ # Route handlers (MVC Controllers)
│ │ ├── Middleware/ # HTTP middleware
│ │ └── Requests/ # Form request validation
│ ├── Models/ # Eloquent models (data layer)
│ └── Providers/ # Service providers (bootstrapping)
│
├── bootstrap/ # Framework bootstrap/start files
│ └── app.php # Entry point for bootstrapping the app
│
├── config/ # Configuration files (app, database, etc.)
├── database/ # Migrations, factories, seeders
│ ├── factories/
│ ├── migrations/
│ └── seeders/
│
├── public/ # Publicly accessible files (index.php, assets)
│ └── index.php # Front controller (entry point for web requests)
│
├── resources/ # Views, raw assets (Sass, JS), translations
│ ├── views/ # Blade templates (HTML views)
│ └── lang/ # Language files
│
├── routes/ # Route definitions
│ ├── web.php # Routes for the web (uses session & CSRF)
│ ├── api.php # Routes for API (stateless)
│ └── console.php # Artisan commands
│
├── storage/ # Logs, compiled views, cache, user uploads
├── tests/ # Unit and feature tests
├── vendor/ # Composer dependencies
├── artisan # CLI for Laravel (Artisan tool)
├── .env # Environment configuration
├── composer.json # PHP dependencies
└── package.json # JS dependencies (optional frontend build tools)
Models (app/Models), Views (resources/views), Controllers (app/Http/Controllers)routes/web.php or routes/api.phpphp artisanapp/Modelsresources/views/users → Route defined in routes/web.phpUserController@indexUserController queries data using a User modelpublic/index.phpIn a Laravel project, the framework is structured in a way that separates core framework code from your application code, so when you update Laravel (e.g., via Composer), only the framework is updated — your application code remains untouched as long as you haven't edited the framework files directly.
When you run:
composer update
Laravel updates packages defined in composer.json, especially:
vendor/laravel/)vendor/laravel/framework/: Laravel's internal code (routing, requests, responses, validation, etc.)vendor/*: Other dependencies like Symfony components, Guzzle, etc.bootstrap/cache/*: May be regenerated (e.g., config.php, routes.php)Laravel does NOT touch your code in:
app/: Your controllers, models, services, etc.routes/: Your route definitionsresources/views/: Blade templatesconfig/: Your config filesdatabase/: Your migrations and seeders.env: Your environment settingspublic/: Your static files and entrypoint (index.php)composer.json / package.json: Unless you manually modify themLaravel itself is modular, and each release (especially major versions) might introduce breaking changes. Even though your app files are untouched, the behavior might change:
Compare your config files with new defaults using:
php artisan config:clear
php artisan config:cache
Lem - Warren Buffett walked into a University of Florida classroom in 1998 ... [2098423133938356224] (1)
Sam Stoffel - Jack Dorsey's simple rule for success in business [2089319019065057280]
Peter-Steinberger-What-Happens-When-4.7-_1786407922546
Monitor_server_action____
Disk_and_RAID_testing_commandsWebDev New York London AI NORWAY DIY Ideas Life Family News Clothing Invest Sports Health