PHPackages                             desino/boilerplate - 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. desino/boilerplate

ActiveLibrary[Framework](/categories/framework)

desino/boilerplate
==================

Desino in-house Laravel boilerplate: auth, user management, app config, and Blade scaffolding via Artisan.

v1.0.2(1mo ago)038MITPHPPHP ^8.1

Since May 21Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/desino/LaravelBoilerPlate)[ Packagist](https://packagist.org/packages/desino/boilerplate)[ Docs](https://github.com/desino/LaravelBoilerPlate)[ RSS](/packages/desino-boilerplate/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (4)Used By (0)

Desino Laravel Boilerplate
==========================

[](#desino-laravel-boilerplate)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2c8c7b6f6b9d77cef3736221a8b0346d88a0553fbad0d0374ba4ad3da07d4f33/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646573696e6f2f626f696c6572706c6174652e737667)](https://packagist.org/packages/desino/boilerplate)[![Total Downloads](https://camo.githubusercontent.com/cae6ff2cfbf77c3a791badd50cbb7745092042d4b5b3f4fdbc2300dc2fad19a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646573696e6f2f626f696c6572706c6174652e737667)](https://packagist.org/packages/desino/boilerplate)[![License](https://camo.githubusercontent.com/5c4bc6813ce915a3228b0edfed70d454b5762f60c2ee475b2ceff3ce3439694f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646573696e6f2f626f696c6572706c6174652e737667)](https://packagist.org/packages/desino/boilerplate)

In-house Laravel starter kit by [Desino](https://desino.be). Publishes authentication, user management, app configuration, Blade layouts, and related scaffolding into an existing Laravel application via a single Artisan command.

**Current stable release:** [v1.0.2](https://github.com/desino/LaravelBoilerPlate/releases/tag/v1.0.2) (Packagist: latest stable tag)

Requirements
------------

[](#requirements)

- PHP ^8.1
- Laravel ^10, ^11, ^12, ^13, or ^14

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

[](#installation)

Install the package with Composer (installs the latest stable release, currently **v1.0.2**):

```
composer require desino/boilerplate
```

To require a minimum version or pin exactly:

```
composer require desino/boilerplate:^1.0.2
# or
composer require desino/boilerplate:1.0.2
```

If you already installed an older tag, update in place:

```
composer update desino/boilerplate --with-dependencies
```

The service provider is auto-discovered. No manual registration is required.

Usage
-----

[](#usage)

Run the publish command **once** on a fresh or prepared Laravel app:

```
php artisan make:desino-boilerplate
```

Use `--force` to overwrite files that already exist (default: skip existing files).

This copies stubs into your application (controllers, models, migrations, views, frontend assets, routes, middleware, seeders, config, and translations). With `--force`, `routes/web.php` is replaced by the package stub; otherwise an existing `routes/web.php` is skipped.

### Recommended dependencies

[](#recommended-dependencies)

The publish command adds `laravel/ui` to your app `composer.json` `require` section (from `composer.require.stub`) when it is not already present. Edit the stub to add more packages if needed.

Then run:

```
composer update
```

### Frontend assets

[](#frontend-assets)

The command publishes `resources/js`, `resources/css`, and `resources/sass` (jQuery, Bootstrap 5, Font Awesome, bootstrap-select, datepicker CSS). `resources/js/bootstrap.js` exposes `jQuery` and `bootstrap` on `window`.

If your app has no `package.json`, the full stub is published. Otherwise missing entries from `package.json.stub` are merged into `devDependencies`, `scripts`, and `overrides` (existing packages are left unchanged).

The publish command removes Laravel Vite defaults when present: `vite.config.js`, `vite.config.ts`, `public/hot`, `public/build`, and Vite-related npm packages/scripts (this boilerplate uses **Laravel Mix** instead).

Build compiled assets expected by the layout (`public/css/app.min.css`, `public/js/app.min.js`):

```
npm install
npm run prod
```

The publish command copies default images to `public/images/` (`logo.png`, `loading.svg`, etc.). Add `public/favicon.ico` in the host app if needed.

### Environment

[](#environment)

```
APP_URL=http://localhost

# Optional: force HTTPS URLs in production
MYAPP_FORCE_HTTPS=true

# Database (standard Laravel)
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database
DB_USERNAME=your_username
DB_PASSWORD=your_password
DB_CHARSET=utf8
DB_COLLATION=utf8_unicode_ci
```

### Database

[](#database)

Ensure the default Laravel `users` migration has been run, then run the published migrations:

```
php artisan migrate
```

The boilerplate adjusts the `users` table (`first_name`, `last_name`, `usertype`, `status`, audit columns) and creates `app_configs`.

### Providers

[](#providers)

The package `Desino\Boilerplate\BoilerplateServiceProvider` is registered automatically via Composer (Artisan command only). You do not add it to `bootstrap/providers.php`.

The publish command copies `CheckUserIsActive` and `CheckUserIsAdmin` into `app/Http/Middleware/`. **You must register them manually** in `bootstrap/app.php` (steps below). The command does not modify `bootstrap/app.php`, because project layouts differ.

The publish command appends this to `bootstrap/providers.php` when missing (Laravel 11+):

```
App\Providers\BladeDefaultVariablesServiceProvider::class,
```

On **Laravel 10**, add that class to the `providers` array in `config/app.php` if `bootstrap/providers.php` does not exist.

### Middleware (Laravel 11, 12, and 13)

[](#middleware-laravel-11-12-and-13)

Laravel 11+ registers middleware in **`bootstrap/app.php`** inside `->withMiddleware()`. The steps are the same for Laravel 11, 12, and 13.

MiddlewareRegistrationPurpose`CheckUserIsActive``$middleware->web(append: [...])`Logs out deactivated users on every web request`CheckUserIsAdmin``$middleware->alias([...])` as `checkIfAdmin`Admin-only routes (used with `auth` in `routes/web.php`)#### Step 1 — Confirm middleware files exist

[](#step-1--confirm-middleware-files-exist)

After `php artisan make:desino-boilerplate`, you should have:

- `app/Http/Middleware/CheckUserIsActive.php`
- `app/Http/Middleware/CheckUserIsAdmin.php`

#### Step 2 — Open `bootstrap/app.php`

[](#step-2--open-bootstrapappphp)

At the top of the file, ensure this import exists (add it if missing):

```
use Illuminate\Foundation\Configuration\Middleware;
```

#### Step 3 — Register inside `->withMiddleware()`

[](#step-3--register-inside--withmiddleware)

Find the `Application::configure(...)` chain. It must include `->withMiddleware(...)`.

**If you already have an empty closure** (common default):

```
->withMiddleware(function (Middleware $middleware) {
    //
})
```

Replace the `//` (or add below it) with:

```
->withMiddleware(function (Middleware $middleware) {
    $middleware->web(append: [
        \App\Http\Middleware\CheckUserIsActive::class,
    ]);

    $middleware->alias([
        'checkIfAdmin' => \App\Http\Middleware\CheckUserIsAdmin::class,
    ]);
})
```

**If `->withMiddleware()` is missing entirely**, add it to the configure chain (between `->withRouting(...)` and `->withExceptions(...)`, for example):

```
return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        commands: __DIR__.'/../routes/console.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware) {
        $middleware->web(append: [
            \App\Http\Middleware\CheckUserIsActive::class,
        ]);

        $middleware->alias([
            'checkIfAdmin' => \App\Http\Middleware\CheckUserIsAdmin::class,
        ]);
    })
    ->withExceptions(function (Exceptions $exceptions) {
        //
    })
    ->create();
```

#### Step 4 — Confirm routes use the alias

[](#step-4--confirm-routes-use-the-alias)

Published `routes/web.php` should wrap admin routes like this:

```
Route::middleware(['auth', 'checkIfAdmin'])->group(function () {
    // users, appconfig, ...
});
```

#### Step 5 — Clear caches (if routes/middleware were cached)

[](#step-5--clear-caches-if-routesmiddleware-were-cached)

```
php artisan optimize:clear
```

#### Troubleshooting

[](#troubleshooting)

SymptomWhat to checkInactive users can still browse`CheckUserIsActive` is inside `web(append: [...])`, not only registered as an aliasAdmin routes return 404 / no middlewareAlias is exactly `checkIfAdmin` and routes use `'checkIfAdmin'`, not `'admin'`Changes have no effectRun `php artisan optimize:clear` and retry in a private browser window#### Laravel 10 only (legacy `Http/Kernel`)

[](#laravel-10-only-legacy-httpkernel)

If your app still has `app/Http/Kernel.php` and no `bootstrap/app.php` middleware configuration:

1. Add to `$middlewareAliases`:

```
'checkIfAdmin' => \App\Http\Middleware\CheckUserIsAdmin::class,
```

2. Append to the `web` key in `$middlewareGroups`:

```
\App\Http\Middleware\CheckUserIsActive::class,
```

### Seed defaults

[](#seed-defaults)

```
php artisan db:seed --class=DesinoBoilerplateSeeder
```

Creates default pagination config (`items_per_page_users = 25`).

### Post-install checklist

[](#post-install-checklist)

1. `composer update` (installs `laravel/ui` after composer.json merge)
2. Configure `.env` (database, `MYAPP_FORCE_HTTPS`)
3. **Register middleware** in `bootstrap/app.php` (see [Middleware](#middleware-laravel-11-12-and-13))
4. Confirm `bootstrap/providers.php` includes `BladeDefaultVariablesServiceProvider` (auto-added when possible)
5. Confirm `routes/web.php` was published (or merge admin routes from the package stub)
6. `npm install && npm run prod` (after package.json merge; see Frontend assets)
7. `php artisan migrate`
8. `php artisan db:seed --class=DesinoBoilerplateSeeder`
9. `php artisan config:cache` (optional, production)

### User roles and status

[](#user-roles-and-status)

ConstantValueMeaning`User::ROLE_ADMIN`1Super admin`User::ROLE_NRMLUSR`2Normal user`User::STATUS_ACTIVE`1Can log in`User::STATUS_INACTIVE`0Blocked (middleware logs out)Published structure
-------------------

[](#published-structure)

PathDescription`app/Http/Controllers/Auth/*`Login, password reset, registration (register disabled in routes)`app/Http/Controllers/UserController.php`User CRUD, activate/deactivate`app/Http/Controllers/AppConfigController.php`Pagination and app settings`app/Http/Middleware/CheckUserIsActive.php`Active account enforcement`app/Http/Middleware/CheckUserIsAdmin.php`Admin-only routes`database/seeders/DesinoBoilerplateSeeder.php`Default config and admin user`routes/web.php`Web routes including auth and admin group`app/Models/User.php`Extended user model`app/Models/AppConfig.php`Key/value app configuration`app/Services/AppMiscService.php`Flash messages, breadcrumbs, config helper`config/myapp.php`App-specific settings`lang/en/messages.php`UI translations`resources/js`, `resources/css`, `resources/sass`Frontend source (compile to `public/`)`webpack.mix.js`Published when missing (Laravel Mix build)Configuration
-------------

[](#configuration)

`config/myapp.php`:

```
'myapp_force_https' => env('MYAPP_FORCE_HTTPS', false),
```

When `true`, `AppServiceProvider` forces `https` for generated URLs.

Routes (summary)
----------------

[](#routes-summary)

MethodURINameAccessGET`/``home`PublicGET/POST`/login`, `/logout`, password resetLaravel UIGuest / authGET/POST`/manual-login``manuallogin`GuestGET/POST`/appconfig``appconfig.config`AdminGET/POST`/users`, `/users/create`, `/users/edit/{id}``users.*`AdminPOST`/users/activate`, `/users/deactivate`, `/users/delete``users.*`AdminPublic registration is disabled (`Auth::routes(['register' => false])`).

SFTP export (optional)
----------------------

[](#sftp-export-optional)

`AppMiscService::exportToFTP()` exports tables to CSV on the `sftp_export` disk. Configure `config/filesystems.php` for your SFTP server before use.

Security notes
--------------

[](#security-notes)

- Run `make:desino-boilerplate` only on trusted environments; use `--force` carefully.
- Do not run the command twice without resolving duplicate migrations.
- Keep `MYAPP_FORCE_HTTPS=true` behind a reverse proxy that sets `X-Forwarded-Proto` correctly.

Releasing on Packagist (maintainers)
------------------------------------

[](#releasing-on-packagist-maintainers)

Composer installs **git tags**, not branch `master`. After merging changes to `master`:

1. Update [CHANGELOG.md](CHANGELOG.md) for the new version.
2. Commit, push, then tag and push the tag (example `v1.0.2`):

```
git tag -a v1.0.2 -m "v1.0.2: short summary of changes"
git push origin master
git push origin v1.0.2
```

3. On [packagist.org/packages/desino/boilerplate](https://packagist.org/packages/desino/boilerplate), click **Update** if the new tag does not appear within a few minutes (or enable the GitHub webhook in package settings for automatic updates).
4. Verify: `composer require desino/boilerplate:^1.0.2`

First-time setup: submit `https://github.com/desino/LaravelBoilerPlate` on [packagist.org/packages/submit](https://packagist.org/packages/submit).

See [CHANGELOG.md](CHANGELOG.md) for version history.

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

Support
-------

[](#support)

Contact:

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance92

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~3 days

Total

3

Last Release

38d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/167307930?v=4)[Desino](/maintainers/desino)[@desino](https://github.com/desino)

---

Top Contributors

[![desino](https://avatars.githubusercontent.com/u/167307930?v=4)](https://github.com/desino "desino (20 commits)")

---

Tags

laravelboilerplatedesino

### Embed Badge

![Health badge](/badges/desino-boilerplate/health.svg)

```
[![Health](https://phpackages.com/badges/desino-boilerplate/health.svg)](https://phpackages.com/packages/desino-boilerplate)
```

###  Alternatives

[laravel/octane

Supercharge your Laravel application's performance.

4.0k26.6M223](/packages/laravel-octane)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[laravel/nightwatch

The official Laravel Nightwatch package.

36210.1M36](/packages/laravel-nightwatch)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3891.8k](/packages/codewithdennis-larament)

PHPackages © 2026

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