lombokclarion / laravel-flavor
Optional preset: the entire 'magic' surface (facades, ActiveRecord connection, default middleware) enabled by ONE greppable bootstrap call. Isolated from app/Domain/** via forbidden-layers.
v2.1.0
2026-08-08 17:25 UTC
Requires
This package is auto-updated.
Last update: 2026-08-09 13:12:23 UTC
README
Laravel-familiar preset: Auth/DB static access, config() and env() helpers.
[READ-ONLY] This is a subtree split of the LombokClarion monorepo.
Do not send pull requests here — contribute to the main repository instead.
Install
composer require lombokclarion/laravel-flavor
Namespace
LombokClarion\LaravelFlavor
What's Inside
| Class | Role |
|---|---|
LaravelFlavor |
Boot helper: wires facades, registers helpers, binds Auth/DB |
Auth |
Static auth: Auth::user(), Auth::check(), Auth::login() |
DB |
Static query: DB::table('x'), DB::select(), DB::insert() |
Usage
use LombokClarion\LaravelFlavor\LaravelFlavor; // Bootstrap (once) LaravelFlavor::boot($container); // Then use familiar patterns: use LombokClarion\LaravelFlavor\Auth; use LombokClarion\LaravelFlavor\DB; $user = Auth::user(); if (Auth::check()) { /* ... */ } $widgets = DB::table('widgets') ->where('status', '=', 'active') ->get();
Note: This package is for teams migrating from Laravel. It wraps the same underlying services (AuthManager, QueryBuilder) with static access. The domain layer remains framework-free.
License
Apache-2.0 — see LICENSE in the main repository.