Organizing your Blade files
To begin, let's look over where our theme files exist per the default Laravel install and do some touch up work to organize them in a better way. We are also going to use a scaffolding library to get us going quickly.
Getting ready
If you have been following this far, you are set. Any fresh install of Laravel should be fine too.
How to do it...
- Install this library, https://github.com/alnutile/l5scaffold, as the documents note. Note the extra step, since it is a fork:
And you may have to add
minimum-stability
at the end of thecomposer.json
file: - Then we are going to
scaffold
out a model, migration, views, and more. - It will output some info, and the last line will show the route your need to add to your
routes.php
fileRoute::resource("users","UserController")
; // Add this line inroutes.php
. - Now we do not need another user migration, so let's delete that one. If you look in the
migration
folder, it is the file at the bottom of that list...