A Laravel Zero based CLI to install Laravel and Filament easily
Larafil was created by HappyToDev and was inspired by a Povilas Korop's tweet.
In one line, you can install Laravel and FilamenPHP :
Exemple :
larafil install myNewAwesomeProject --create-user --filament-url=batcave --mysql --serve
With this single line, Larafil
myNewAwesomeProject
.env
file, create the MySQL database, launch migrations, remove database.sqlite
databasebatcave
Every option is optional.
If you don't provide the name of the application, Larafil will ask you for it, so you can perfectly use this command instead of that above :
larafil install --create-user --filament-url=batcave --mysql --serve
when Larafil will ask you for the name of the project, it wiil be up to you to give you the name.
Get it on Packagist
composer global require happytodev/larafil
and just use it :
larafil install
It will ask you the name of your future application.
You can change the default '/admin' url to the url you want. You have just to pass the option with your new value :
larafil install --filament-url=batcave
Once the installation finished, you can access to your dashboard with <url.of.your.project>/batcave>
You can ask for a Filament user creation at the end of the installation :
larafil install --create-user
You can also ask to launch Laravel integrated server after the installation :
larafil install --serve
Of course, you can combine the two options together :
larafil install --create-user --serve
If you want to use MySQL database instead the sqlite default one, you can use the --mysql
option :
larafil install --create-user --mysql --serve
If you want to use Laravel 10 instead Laravel 11, you can pass the l10
option during installation :
larafil install --create-user --laravel-version=previous --serve
Nota : you can't use l10
and mysql
option together. That's because Laravel 10 use mysql by default. For Laravel 11, it's SQLite by default.
If you try to use both together, you will have an error and the install stops.
The purpose of Larafil was to play with Laravel Zero from Nuno Maduro.
git clone https://github.com/happytodev/larafil.git larafil
composer install
php larafil app:build
./builds/larafil -V
I don't know if there is another thing to develop for Larafil but tell me. It will be my pleasure to develop some good ideas for this little project.
Do you like this project? Support it by donating
Get my free ebook about news in Laravel 11
Larafil is an open-source software licensed under the MIT license.