Directory structure changes in Laravel 5.3
This is a series of posts on New Features in Laravel 5.3.
!Warning: This post is over a year old. I don't always update old posts with new information, so some of this information may be out of date.
We've already covered the new routes
directory and the changes that will make to the directory structure. But there's one other directory change coming in Laravel 5.3: many of the default folders will not show up until you run a command that requires them.
These directories come in each new version of Laravel prior to 5.3 but are often not used, so all new installs won't have them. Here's the list of folders that are going away:
Events
Jobs
Listeners
Policies
Notice a pattern? These are directories that contain a single, more advanced class structure that aren't universal to Laravel apps. Events, Jobs, Listeners, and Policies.
One note: If you were used to manually creating classes for each of those structures, you may find this change adds an extra step; but if so, it's really worth considering using Artisan to create them anyway. Artisan will handle creating these directories if they don't exist, so the change should be transparent in that context.
For a great visual of how this change will simplify a default Laravel install, take a look at this graphic from Laravel News:
(image from Laravel News post Laravel 5.3 changes the 'app' folder)
There are also new folders that won't show up on a new install but might show up after you use Artisan generators: app/Mail
for Mailables and app/Notifications
for Notifications.
Comments? I'm @stauffermatt on Twitter
Tags: laravel • laravel 5.3
This is part of a series of posts on New Features in Laravel 5.3:
-
Jun 16, 2016 | laravel, laravel 5.3, echo, websockets
-
Jun 27, 2016 | laravel, laravel 5.3
-
Jun 29, 2016 | laravel, laravel 5.3, eloquent
-
Jul 6, 2016 | laravel, laravel 5.3
-
Jul 8, 2016 | laravel, laravel 5.3
-
Jul 8, 2016 | laravel, laravel 5.3, eloquent
-
Jul 25, 2016 | laravel, laravel 5.3
-
Jul 26, 2016 | laravel, laravel 5.3
-
Jul 27, 2016 | laravel, laravel 5.3, routing
-
Jul 27, 2016 | laravel, laravel 5.3, laravel scout, laravel passport, mailable
-
Jul 29, 2016 | laravel, laravel 5.3, laravel scout
-
Jul 30, 2016 | laravel, laravel 5.3, laravel passport, oauth
-
Aug 5, 2016 | laravel, laravel 5.3, mail, laravel mailables
-
Aug 8, 2016 | laravel, laravel 5.3
-
Oct 19, 2016 | laravel, laravel 5.3, laravel notifications, notifications
-
Dec 21, 2016 | laravel, laravel 5.3, vuejs, vueify, authorization
-
Dec 21, 2016 | laravel, laravel 5.3, queues
-
Jan 30, 2017 | laravel, laravel 5.3, artisan