PHPackages                             qruto/laravel-flora - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. qruto/laravel-flora

ActiveLibrary[Queues &amp; Workers](/categories/queues)

qruto/laravel-flora
===================

Install and update Laravel application with single command

1.2.0(2y ago)13197.8k↑33.3%5[4 PRs](https://github.com/qruto/laravel-flora/pulls)MITPHPPHP ^8.1CI passing

Since Mar 7Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/qruto/laravel-flora)[ Packagist](https://packagist.org/packages/qruto/laravel-flora)[ Docs](https://github.com/qruto/laravel-flora)[ Fund](https://revolut.me/slavarazum)[ GitHub Sponsors](https://github.com/qruto)[ RSS](/packages/qruto-laravel-flora/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (21)Versions (7)Used By (0)

    ![Laravel Flora Logo](https://github.com/qruto/laravel-flora/raw/HEAD/art/logo-light.png)

A convenient way to automate **setup** of your application.

    ![Laravel Flora Code Example](https://github.com/qruto/laravel-flora/raw/HEAD/art/code-example-light.svg)

 [![Build Status](https://github.com/qruto/laravel-flora/actions/workflows/tests.yml/badge.svg)](https://github.com/qruto/laravel-flora/actions/workflows/tests.yml) [![Styles check](https://github.com/qruto/laravel-flora/actions/workflows/styles.yml/badge.svg)](https://github.com/qruto/laravel-flora/actions/workflows/styles.yml) [![Types check](https://github.com/qruto/laravel-flora/actions/workflows/types.yml/badge.svg)](https://github.com/qruto/laravel-flora/actions/workflows/types.yml) [![Refactor code](https://github.com/qruto/laravel-flora/actions/workflows/refactor.yml/badge.svg)](https://github.com/qruto/laravel-flora/actions/workflows/refactor.yml) [![Total Downloads](https://camo.githubusercontent.com/54eb54b0a22e77bc6ac9241d21e767ec0885ca150418d43f76795bd353511cb9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f717275746f2f6c61726176656c2d666c6f7261)](https://packagist.org/packages/qruto/laravel-flora) [![Latest Stable Version](https://camo.githubusercontent.com/4658af9ed602f2079802f157a40177ea475c688248b13fb03ea6af9f85b4defa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f717275746f2f6c61726176656c2d666c6f7261)](https://packagist.org/packages/qruto/laravel-flora)

 [![Laravel Flora Demo](/art/demo.png)](/art/demo.png)

Goal
----

[](#goal)

The main goal of *Flora* is define and automate the setup process of Laravel application. All necessary actions to make the application ready to work in one place.

Packages discovering, assets building and publishing, running database migrations, caching etc...

> 🧠🚀 Put the knowledge of setup instructions at the application level.

Introduction
------------

[](#introduction)

Revival of [Laravel Initializer](https://laravel-news.com/automate-app-setup-with-laravel-initializer). Rethinked, improved, prettified, renamed.

*Flora* allows you to bring Laravel application to live by one command. Use default or define custom chain of actions required to **install** or **update** an application.

Run `install` when you fetch a fresh application to prepare it to launch on new environment.

- after `git clone`

Run `update` on every dependency or source code change.

- after `composer install|update`
- after `git pull|checkout|megre|...`
- in deploy script
- in CI/CD pipeline

it will take care of the rest of the work.

Support
-------

[](#support)

Since of February 24, unfortunately I haven't any commercial work, permanent living place or the ability to plan anything for the long term. However, I have a greater desire to continue creating useful solutions for people around the world. It makes me feel better these days.

[![support me](https://raw.githubusercontent.com/slavarazum/slavarazum/main/support-banner.png)](https://github.com/sponsors/qruto)

[GitHub Sponsorships profile](https://github.com/sponsors/qruto) is ready! There you can find current work, future plans, goals and dreams... Your stars make me happier each day ❤️ ⭐ Sponsorship will enable us to live more peacefully and continue to work on useful solutions for you.

I would be very grateful for mentions or just a sincere "thank you".

💳 [Sponsoring directly to savings jar](https://send.monobank.ua/jar/3eG4Vafvzq) with card or Apple Pay/Google Pay.

Installation
------------

[](#installation)

Via Composer:

```
composer require qruto/laravel-flora
```

Usage
-----

[](#usage)

Replace **installation** section in readme file with:

```
php artisan install
```

Refresh application state by:

```
php artisan update
```

> ℹ️ Instruction depends on current **environment**. Package has predefined actions suitable for most cases.

See detailed output in verbosity mode:

```
php artisan app:update -v
```

You can automate the update process by adding `@php artisan update` command to your application `composer.json` script `post-autoload-dump` section and remove default `vendor:publish` command from `post-update-cmd` section. `update` command will take care of assets publishing for you.

Setup it with:

```
php artisan flora:setup --script
```

`composer.json` changes:

```
"post-autoload-dump": [
    "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
-     "@php artisan package:discover --ansi"
+     "@php artisan update"
],
- "post-update-cmd": [
-     "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
- ],
```

### Register Task Scheduler

[](#register-task-scheduler)

Conditions:

- any scheduler task registered
- installation process performed
- application in production environment

then you will be prompted for the addition of a cron entry to [run the task scheduler every minute](https://laravel.com/docs/master/scheduling#running-the-scheduler).

[![Task Scheduler](https://github.com/qruto/laravel-flora/raw/HEAD/art/task-scheduling.png)](https://github.com/qruto/laravel-flora/raw/HEAD/art/task-scheduling.png)

Configuration
-------------

[](#configuration)

To customize instructions for each environment, you need to publish setup files.

```
php artisan flora:setup
```

This command will create `routes/setup.php` file with predefined instructions for `local` and `production` environments.

```
use Qruto\Flora\Run;

App::install('local', fn (Run $run) => $run
    ->command('key:generate')
    ->command('migrate')
    ->command('storage:link')
    ->script('build')
);

App::install('production', fn (Run $run) => $run
    ->command('key:generate', ['--force' => true])
    ->command('migrate', ['--force' => true])
    ->command('storage:link')
    ->script('cache')
    ->script('build')
);

App::update('local', fn (Run $run) => $run
    ->command('migrate')
    ->command('cache:clear')
    ->script('build')
);

App::update('production', fn (Run $run) => $run
    ->script('cache')
    ->command('migrate', ['--force' => true])
    ->command('cache:clear')
    ->command('queue:restart')
    ->script('build')
);
```

Feel free to change it any way you need or add specific environment like `staging`.

`build` and `cache` script details`build` script contains assets building commands:

```
npm install
npm run build
```

`cache` script provides general application caching:

```
php artisan route:cache
php artisan config:cache
php artisan event:cache
```

In addition, it will create `config/flora.php` for configuration assets publishing.

```
return [
    /*
    |--------------------------------------------------------------------------
    | Force Assets Publish
    |--------------------------------------------------------------------------
    |
    | Force publish assets on every installation or update. By default, assets
    | will always be force published, which would completely automate the
    | setup. Switch it to false if you want to manually publish assets.
    | For example if you prefer to commit them.
    */
    'force_publish' => true,

    /*
    |--------------------------------------------------------------------------
    | Publishable Assets
    |--------------------------------------------------------------------------
    |
    | List of assets that will be published during installation or update.
    | Most of required assets detects on the way. If you need specific
    | tag or provider, feel free to add it to the array.
    */
    'assets' => [
        'laravel-assets',
    ],
];
```

If you need to customize just assets publishing, you can publish only configuration file:

```
php artisan vendor:publish --tag=flora-config
```

### Side Packages Support

[](#side-packages-support)

*Flora* automatically detects several packages for performing necessary actions on install or update. For example: publish Vapor UI assets, generate IDE helper files, terminate Horizon workers etc.

Supported:

- [Laravel Vapor Ui](https://github.com/laravel/vapor-ui)
- [Laravel Horizon](https://github.com/laravel/horizon)
- [IDE Helper for Laravel](https://github.com/barryvdh/laravel-ide-helper)

Soon:

- [Laravel Octane](https://laravel.com/docs/10.x/octane#reloading-the-workers)
- [Laravel Nova](https://nova.laravel.com/docs/4.0/installation.html#updating-nova-s-assets)
- [Laravel Passport](https://laravel.com/docs/10.x/passport#deploying-passport)

### Custom Scripts

[](#custom-scripts)

Override or define custom script in service provider's `boot` method:

```
Run::newScript('cache', fn (Run $run) => $run
    ->command('route:cache')
    ->command('config:cache')
    ->command('event:cache')
    ->command('view:cache')
);
```

### Available Actions

[](#available-actions)

```
$run
    ->command('command') // Run artisan command
    ->script('build') // Perform custom script
    ->exec('process') // Execute external process
    ->job(new JobClass) // Dispatch job
    ->call(fn () => makeSomething()) // Call callable function
    ->notify('Done!') // Send notification
```

Upgrading
---------

[](#upgrading)

Please see [UPGRADING](UPGRADING.md) for details.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CONDUCT](.github/CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

Thanks [Nuno Maduro](https://github.com/nunomaduro) for [laravel-desktop-notifier](https://github.com/nunomaduro/laravel-desktop-notifier) package which brings desktop notifications to Laravel.

- [Qruto](https://github.com/qruto)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance59

Moderate activity, may be stable

Popularity44

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~201 days

Total

3

Last Release

759d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/168def029554d2e57e1bfeadf4a4dcf38152d6415d3b171823a2e1145feb53ed?d=identicon)[Slava Razum](/maintainers/Slava%20Razum)

---

Top Contributors

[![slavarazum](https://avatars.githubusercontent.com/u/5820718?v=4)](https://github.com/slavarazum "slavarazum (171 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (20 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (15 commits)")[![klimov-paul](https://avatars.githubusercontent.com/u/1482054?v=4)](https://github.com/klimov-paul "klimov-paul (2 commits)")[![mnabialek](https://avatars.githubusercontent.com/u/7656807?v=4)](https://github.com/mnabialek "mnabialek (1 commits)")[![zembrowski](https://avatars.githubusercontent.com/u/2451083?v=4)](https://github.com/zembrowski "zembrowski (1 commits)")

---

Tags

commanddeployinstalllaravelphpsetupupdateprocessjobcommanddeployTasksinstallupdateexecsetupqrutoinitinitializelaravel-flora

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/qruto-laravel-flora/health.svg)

```
[![Health](https://phpackages.com/badges/qruto-laravel-flora/health.svg)](https://phpackages.com/packages/qruto-laravel-flora)
```

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[genealabs/laravel-model-caching

Automatic caching for Eloquent models.

2.4k4.8M26](/packages/genealabs-laravel-model-caching)[illuminate/queue

The Illuminate Queue package.

20331.4M1.2k](/packages/illuminate-queue)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[lorisleiva/laravel-actions

Laravel components that take care of one specific task

2.8k7.5M115](/packages/lorisleiva-laravel-actions)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
