A Laravel preset that scaffolds out new applications the way I like 'em 👊
Inspired by Adam Wathan among other members of the Laravel community
- Tailwind CSS
- postcss-nesting for nested CSS support
- postcss-import for inlining @import rules
- Purgecss, via spatie/laravel-mix-purgecss
- Vue.js
- Moment
- Removes Bootstrap, jQuery, and Popper.js
- Adds simple JavaScript setup
- Adds simple Tailwind configured CSS setup
- Configuration for Laravel Mix
- Adds compiled assets and those pesky
.DS_Store
files to.gitignore
- Replaces the
welcome.blade.php
template withhome.blade.php
that extends a main layout and includes a favicon partial. Also updates the routesweb.php
file to use thehome
view.
- Adds doctrine/dbal for migrations
- Adds barryvdh/laravel-debugbar for debugging
- Adds codedungeon/phpunit-result-printer for nicer console output when running phpunit tests
- Adds jtant/laravel-env-sync along with githooks for pre-push and post-checkout to keep your env file in sync. Credit to the great article by Caleb Porzio
- Adds sensiolabs/security-checker to check for package dependencies with security vunerabilites. Run with
composer run-script security-check
. - Sets up a
Models
folder within yourapp
directory and moves the defaultUser.php
class there (also updates all references fromApp\User
toApp\Models\User
) - Adds some testing helpers & speed improvements
- Adds
assertContains
,assertNotContains
andassertEquals
assertion methods for Eloquent Collections - Adds
weh
method - short forwithoutExceptionHandling
directly onTestCase
- Sets rounds for bcrypt driver to 2 instead of the default of 10 to speed up tests
- Adds
- Adds initial UsersSeeder (Add your own name and email here)
- Laravel 5.5
- Laravel 5.6
- Laravel 5.7
This package isn't on Packagist (yet), so to get started, add it as a repository to your composer.json
file:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/llaski/laravel-preset"
}
]
Next, run this command to add the preset to your project:
composer require llaski/laravel-preset --dev
Finally, apply the scaffolding by running:
php artisan preset builtbylarry
Update your composer packages:
composer update
Update your npm packages:
npm install
Create your tailwind config file
./node_modules/.bin/tailwind init
And of course, run the build process!
npm run dev
This package will add githooks to your setup, so ideally you would have already setup git for this project. If not, you'll have to run the following command to set the path to your githooks folder:
git config core.hooksPath githooks
Also note this command will need to be run for any other developers working on the project.
What's
builtbylarry
? Built By Larry is the name of my freelance business. Interested in learning more, you say? Check out my work at https://larrylaski.com or hit me up at [email protected].