PHPackages                             usanzadunje/scaffold-laravel - 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. [Framework](/categories/framework)
4. /
5. usanzadunje/scaffold-laravel

ActiveLibrary[Framework](/categories/framework)

usanzadunje/scaffold-laravel
============================

Multiple scaffolding options for Laravel application.

v1.2(4y ago)018[3 PRs](https://github.com/usanzadunje/scaffold-laravel/pulls)MITPHPPHP ^7.4|^8.0

Since Jan 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/usanzadunje/scaffold-laravel)[ Packagist](https://packagist.org/packages/usanzadunje/scaffold-laravel)[ Docs](https://github.com/usanzadunje/scaffold-laravel)[ GitHub Sponsors](https://github.com/usanzadunje)[ RSS](/packages/usanzadunje-scaffold-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (11)Versions (7)Used By (0)

Scaffold Laravel application.
=============================

[](#scaffold-laravel-application)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3d9a2abd2ad87e3bc27aaf480796875909b52f1658e8201a452cb8ca9ef9fdf9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7573616e7a6164756e6a652f73636166666f6c642d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/usanzadunje/scaffold-laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/4b26ce353a06f54321d8b69268a6fbc1d9fec51d5f849a9ccaf50619e023e693/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7573616e7a6164756e6a652f73636166666f6c642d6c61726176656c2f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/usanzadunje/scaffold-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c1eae86c5301dbc5adf2eda45a1a48ff09bb19d8a969c5613f03ace6de78bc1c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7573616e7a6164756e6a652f73636166666f6c642d6c61726176656c2f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/usanzadunje/scaffold-laravel/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/bf20f7e267d755cc9137172658cf3c4f9ee2985f5130cccf6ac65de509f7286a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7573616e7a6164756e6a652f73636166666f6c642d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/usanzadunje/scaffold-laravel)

Multiple scaffolding options for Laravel application.

Installing Vue, adding Vue Router/Inertia as your frontend router, adding Vuex as state manager. Replacing Webpack with Vite or installing Browser Sync plugin for Webpack. Also adds scaffolding for Docker with any of these presets mentioned.

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

[](#installation)

You can install the package via composer:

```
composer require usanzadunje/scaffold-laravel
```

Usage
-----

[](#usage)

```
php artisan scaffold [preset]
```

Available presets :

- `vue`
- `vue-router` *(if you have vue application set up)*
- `vuex` *(if you have vue application set up)*
- `vite` *(replaces webpack for vite)*
- `docker`
- `all` *(installs vue, vite and docker preset all together)*

Vue
---

[](#vue)

Will generate following files and directories inside your resources/js directory :

- `components` directory
- `composables` directory
- `views` directory and `Example.vue` inside it
- `app.js` files with minimal scaffolding for Vue application
- `app.blade.php` file with #app container defined
- Change `/` route to return `app` view instead of `welcome`

Additionally, it will ask if you would like router or state manager installed as well.

Vue Router
----------

[](#vue-router)

Will generate following files and directories inside your resources/js directory :

- `router` directory and inside it basic scaffolding for routes with one example route defined
- `Welcome.vue` file inside `views` which will be shown for example route defined
- `ExampleApp.vue` which will serve as entrypoint to router *(it has defined in it)*
- It will initialize itself inside `app.js` file

Additionally, it will ask if you would like basic middleware scaffolding for your routes. This will then create `middlewarePipeline.js` file which is responsible for calling all middlewares defined on certain route. And inside `router/index,js` file where routes are defined it will add `beforeEach` navigation gourd and call this pipeline.

Routes which require middleware(s) should have meta filed with middleware property defined on them which is an array of middlewares. You can define your middlewares in `middlewares` directory which will be created along with example middleware.

Vuex
----

[](#vuex)

Will generate following files and directories inside your resources/js directory :

- `store` directory and inside it basic scaffolding for vuex in module fashion
- `Module.js` file inside `store` which is example of single module state
- It will initialize itself inside `app.js` file
- Vuex scaffolding comes along with `vue-persistedstate` plugin which will persist data from state in `Local Storage`

Vite
----

[](#vite)

Will remove all packages, scripts and files associated with `Webpack`. Additionally, it will create `vite.config.js` in root of project directory and setup basic configuration.

If you have `Vue` installed it will add `Vite` plugin for `Vue` and optimize configuration for it as well (same goes if `Vue Router` or `Vuex` are installed)

If you installed `Vue` using this package it will generate `app.blade.php` file and `Vite` scaffolding will remove assets(css/js) imported using `Webpack` and generate `@vite` blade directive which will generate imports for `Vite` assets(css/js). If you however do not have `app.blade.php` file it will not try and replace these, so you will need to add `@vite` directive yourself to your layout file. It will also import your `css/app.css` file inside app.js since this is how `Vite` handles css.

Docker
------

[](#docker)

Will generate `docker-compose.yml` and `docker-compose.prod.yml` files with container details. Also it will generate docker-compose directory which contains configuration for: `nginx`, `php`, `suppervisord` and initialization scripts for development and production.

It will adopt itself depending on whether you use `Webpack` or `Vite` in order to work smoothly with them and change `Webpack` or `Vite` configuration accordingly

It will change your `.env` file and following contents of it:

- `DB_HOST` and set it to `db` so docker can resolve it, since database will live inside container
- `DB_USERNAME` **only** if it is set to `root` and will change it to `laravel`
- `DB_PASSWORD` **only** if it is set to nothing(empty) and will change it to `laravel`
- `DB_PORT` **only** if it is set to something other than `3306` since this is port used by container\_name

Additional information:

Database port exposed on your local machine is set to 3310 if you want to connect to it from your host machine.

Application port if using with `Webpack` but without `Browser Sync` plugin setup will be exposed to `8000`(served on `localhost:8000`).

If you are however using `Webpack` with `Browser Sync` port exposed will be `3000` (served on `localhost:3000`)

When using `Vite` port exposed will be `3000` (served on `localhost:3000`)

Scripts that are responsible for applications in production / development are inside `docker-compose` directory, and they are `init.sh` / `initDev.sh` files respectively. Feel free to change them as these are commands that will run on start of the container which hold application.

Disclaimer
----------

[](#disclaimer)

This is my first package, and I made it primarily because I caught myself doing same things on almost every project(copy -&gt; pasting) so I wanted to save myself some time and created this. I also tweaked it a little, so it could be used in multiple occasions so maybe other people can use it. But keep in mind it was made having my problems in mind.

If you have any suggestion that would help you or things to add I would be happy to do it. If it helps one person I would be glad :).

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Dusan Djordjevic](https://github.com/usanzadunje)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.6% 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 ~6 days

Total

3

Last Release

1549d ago

PHP version history (2 changes)v1.0PHP ^8.0

v1.2PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f474d54b96029bca3aa9842351e981fe6ecc9effbc58414aa6f67b1079d6d3b1?d=identicon)[usanzadunje](/maintainers/usanzadunje)

---

Top Contributors

[![usanzadunje](https://avatars.githubusercontent.com/u/22146568?v=4)](https://github.com/usanzadunje "usanzadunje (42 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")

---

Tags

laravelusanzadunjescaffold-laravel

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/usanzadunje-scaffold-laravel/health.svg)

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

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M225](/packages/laravel-horizon)[lunarstorm/laravel-ddd

A Laravel toolkit for Domain Driven Design patterns

17959.0k](/packages/lunarstorm-laravel-ddd)[bezhansalleh/filament-plugin-essentials

A collection of essential traits that streamline Filament plugin development by taking care of the boilerplate, so you can focus on shipping real features faster

27584.7k16](/packages/bezhansalleh-filament-plugin-essentials)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[jonpurvis/squeaky

A Laravel Validation Rule to Help Catch Profanity.

706.0k](/packages/jonpurvis-squeaky)[blendbyte/filament-title-with-slug

TitleWithSlugInput - Easy Permalink Slugs for the FilamentPHP Form Builder (PHP / Laravel / Livewire)

1322.4k3](/packages/blendbyte-filament-title-with-slug)

PHPackages © 2026

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