lmendes/template

A ready-to-use Laravel template package with auth, dashboard, Blade components and helpers.

Maintainers

Package info

github.com/Leo-76/lmendes-template

Language:Blade

pkg:composer/lmendes/template

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-04-16 01:59 UTC

This package is not auto-updated.

Last update: 2026-04-17 04:08:55 UTC


README

A ready-to-use Laravel template package with authentication, dashboard, reusable Blade components, and helpers — installable in any existing Laravel project.

Requirements

  • PHP 8.1+
  • Laravel 10, 11 or 12

Installation

composer require lmendes/template

Then run the install command:

php artisan template:install

This will publish the config, views and run the migrations.

What's included

Feature Details
Auth Login, Register, Logout controllers & views
Dashboard Clean sidebar layout with stats
Profile Edit name/email + change password
Blade Components <x-template-card>, <x-template-alert>, <x-template-button>, <x-template-badge>, <x-template-modal>
Helpers template_config(), initials(), money(), template_menu(), template_theme()

Routes

URL Name Middleware
/template/login template.login guest
/template/register template.register guest
/template/dashboard template.dashboard auth
/template/profile template.profile auth

Configuration

After install, edit config/template.php:

return [
    'name'  => 'My App',        // App name shown in sidebar
    'theme' => 'light',         // 'light' | 'dark' | 'auto'
    'color' => '#6366f1',       // Brand color (CSS hex)

    'auth' => [
        'register_enabled'     => true,
        'redirect_after_login' => '/dashboard',
    ],

    'menu' => [
        ['label' => 'Dashboard', 'icon' => 'home',  'route' => 'template.dashboard'],
        ['label' => 'Profile',   'icon' => 'user',  'route' => 'template.profile'],
    ],
];

Or use .env variables:

TEMPLATE_THEME=dark
TEMPLATE_COLOR=#f43f5e
TEMPLATE_REGISTER=false

Blade Components

Card

<x-template-card title="Users" subtitle="All registered users">
    Content here
</x-template-card>

Alert

<x-template-alert type="success" title="Done!" :dismissible="true">
    Your changes have been saved.
</x-template-alert>

Types: info | success | warning | danger

Button

<x-template-button variant="primary" size="md">Save</x-template-button>
<x-template-button href="/back" variant="ghost">Cancel</x-template-button>
<x-template-button :loading="true">Saving…</x-template-button>

Variants: primary | secondary | danger | ghost

Badge

<x-template-badge color="green" :dot="true">Active</x-template-badge>

Colors: indigo | green | red | yellow | gray

Modal

<x-template-modal id="confirm-modal" title="Confirm action" size="sm">
    <p>Are you sure?</p>
    <x-template-button onclick="closeModal('confirm-modal')" variant="secondary">Cancel</x-template-button>
    <x-template-button variant="danger">Delete</x-template-button>
</x-template-modal>

<x-template-button onclick="openModal('confirm-modal')">Open modal</x-template-button>

Helpers

template_config('name')        // Get config value
template_menu()                // Get sidebar menu array
template_theme()               // 'light' | 'dark' | 'auto'
initials('Jean Dupont')        // 'JD'
money(1500.50)                 // '1 500,50 €'

Publish views to customise

php artisan vendor:publish --tag=template-views

Views will be copied to resources/views/vendor/template/ and will take priority over package views.

Artisan command options

php artisan template:install --force          # Overwrite existing files
php artisan template:install --no-migration   # Skip migrations

License

MIT — © lmendes