lmendes/template
Composer 安装命令:
composer require lmendes/template
包简介
A ready-to-use Laravel template package with auth, dashboard, Blade components and helpers.
README 文档
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
lmendes/template 适用场景与选型建议
lmendes/template 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「template」 「boilerplate」 「auth」 「laravel」 「dashboard」 「starter」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lmendes/template 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lmendes/template 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lmendes/template 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel Multiauth package
PHP class to extend when building a WordPress plugin allowing you to follow smart plugin setup standards.
A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.
Anax htmlform module.
This package provides a flexible way to add Role-based Permissions to Laravel 6.x
Email Toolkit Plugin for CakePHP
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 38
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-16