Laravel EnsoLaravel Enso
Guide
Back End
Front End
GitHub
Guide
Back End
Front End
GitHub
  • Back End

    • Action Logger
    • Addresses
    • Algolia
    • Algolia Webshop
    • API
    • Audits
    • Avatars
    • Cache Chain
    • Calendar
    • Cargo Partner
    • Categories
    • Charts
    • CI/CD
    • Cli
    • CNP Validator
    • Comments
    • Commercial
    • Companies
    • Core
    • Countries
    • Currencies
    • Data Export
    • Data Import
    • Discounts
    • Documents
    • Dynamic Methods
    • EAV
    • Emag
    • Enums
    • Excel
    • Facebook
    • Files
    • Filters
    • Financials
    • Forms
    • Frisbo
    • Google
    • Helpers
    • Holidays
    • How-to
    • Image Transformer
    • Impersonate
    • Interactions
    • Inventory
    • IO
    • Localisation
    • Lockable Models
    • Logs
    • Measurement Units
    • Meili Search
    • Meili Search Webshop
    • Menus
    • Migrator
    • Monitored Emails
    • Notifications
    • Packaging Units
    • PDF
    • People
    • Permissions
    • Product Eav
    • Product Lots
    • Products
    • Questionnaires
    • Rememberable
    • Roles
    • Sale Channels
    • Searchable
    • Select
    • Sentry
    • Services
    • Smart Bill
    • Sms Advert
    • Stripe
    • Tables
    • Tasks
    • Teams
    • Ticketing
    • Track Who
    • Tutorials
    • Typesense
    • Typesense Webshop
    • Unit Conversion
    • Upgrade
    • UPS
    • User Groups
    • Users
    • Versions
    • Virtual Call Center
    • Vouchers
    • Webshop
    • Webshop Commercial

Core

LicenseStableDownloadsPHPIssuesMerge Requests

Description

Core is the backend shell of a Laravel Enso application.

It aggregates the packages required for a standard Enso installation, registers the framework-level service providers and middleware stack, exposes the base authentication and SPA endpoints, builds the frontend boot state, manages user preferences, publishes shared assets and mail resources, and provides a handful of operational commands used across Enso projects.

It is the package that turns the rest of the Enso ecosystem into a coherent application runtime.

Installation

This package is intended to be installed as the main backend dependency of an Enso application:

composer require laravel-enso/core

After installation, run the standard setup steps:

php artisan migrate
php artisan db:seed

If you want to publish the package resources, the relevant tags are:

php artisan vendor:publish --tag=core-config
php artisan vendor:publish --tag=core-seeders
php artisan vendor:publish --tag=core-assets
php artisan vendor:publish --tag=core-email

The package automatically:

  • loads API routes
  • loads migrations
  • loads mail views
  • registers Enso service providers
  • configures the Eloquent factory resolver for package models

Features

  • Provides the base Enso API shell, including guest meta, SPA home state, auth routes, and preferences routes.
  • Registers the core middleware group used by authenticated Enso routes.
  • Configures password policy defaults from enso.auth.password.
  • Builds the SPA boot state from state providers discovered across Enso packages.
  • Persists per-user global and route-level preferences.
  • Publishes shared email templates and image assets.
  • Registers operational commands for version reporting, storage resets, preference resets, preference upgrades, and app-update notifications.
  • Integrates login tracking, password reset flows, websocket support, route authorization, localisation, impersonation, and action logging through the wider Enso stack.

Usage

The package exposes the guest meta endpoint:

route('meta');

Authenticated clients bootstrap the SPA state through:

route('core.home.index');

Preferences can be updated per route or globally through:

route('core.preferences.store', ['route' => 'administration.users.index']);
route('core.preferences.reset');

Useful built-in commands:

php artisan enso:version
php artisan enso:preferences:reset
php artisan enso:preferences:update-global
php artisan enso:storage:reset
php artisan enso:announce-app-update

The frontend counterpart for the API shell and shared UI runtime lives in the Enso UI package:

  • @enso-ui/ui ↗

Note

core.home.index does not return a Blade page. It returns the merged state payload produced by the Enso state builder, grouped by frontend store.

API

Routes

Guest / auth endpoints:

  • GET /api/meta
  • POST /api/login
  • POST /api/password/email
  • POST /api/password/reset
  • POST /api/logout

Authenticated core endpoints:

  • GET /api/core/home
  • PATCH /api/core/preferences/store/{route?}
  • POST /api/core/preferences/reset/{route?}

Middleware

Aliases:

  • verify-active-state
  • xss-sanitizer
  • ensure-frontent-requests-are-stateful

core middleware group:

  • VerifyActiveState
  • ActionLogger
  • Impersonate
  • VerifyRouteAccess
  • SetLanguage

State System

State is built through:

  • LaravelEnso\Core\Services\State\Builder
  • LaravelEnso\Core\Services\State\Source

It scans configured vendors from:

  • config('enso.state.vendors')

Built-in state providers include:

  • Meta
  • Preferences
  • Themes
  • Websockets

Preferences

Model:

  • LaravelEnso\Core\Models\Preferences

Capabilities:

  • route-level local preferences
  • global preferences
  • theme updates
  • language updates
  • reset to factory defaults

Commands

  • enso:version
  • enso:preferences:reset
  • enso:preferences:update-global
  • enso:storage:reset
  • enso:announce-app-update

Events and Notifications

Events:

  • LaravelEnso\Core\Events\Login
  • LaravelEnso\Core\Events\AppUpdate

Notifications:

  • PasswordExpiresSoon
  • ResetPassword

Depends On

Required Enso packages:

  • laravel-enso/action-logger ↗
  • laravel-enso/charts ↗
  • laravel-enso/countries ↗
  • laravel-enso/data-export ↗
  • laravel-enso/helpers ↗
  • laravel-enso/history-tracker ↗
  • laravel-enso/impersonate ↗
  • laravel-enso/localisation ↗
  • laravel-enso/logs ↗
  • laravel-enso/menus ↗
  • laravel-enso/migrator ↗
  • laravel-enso/notifications ↗
  • laravel-enso/permissions ↗
  • laravel-enso/rememberable ↗
  • laravel-enso/roles ↗
  • laravel-enso/sentry ↗
  • laravel-enso/upgrade ↗
  • laravel-enso/user-groups ↗
  • laravel-enso/users ↗

Framework and external dependencies:

  • laravel/framework ↗
  • laravel/sanctum ↗
  • jenssegers/agent ↗

Contributions

are welcome. Pull requests are great, but issues are good too.

Thank you to all the people who already contributed to Enso!

Edit this page on GitHub
Last Updated: 4/19/2026, 10:22:02 PM
Prev
Companies
Next
Countries