maestriam/samurai
Composer 安装命令:
composer require maestriam/samurai
包简介
Create awsome themes for your Laravel projects.
README 文档
README
🔴 maestriam/samurai
Create awesome themes for your Laravel projects.
Maestriam/Samurai is a simple package for creating and managing themes for Laravel applications, using component and include functions of Laravel Blade.
You can publishing your themes and install-it in another projects using composer.
Requirements
- Laravel 8.*^
Installation
Install via composer
composer require maestriam/samurai
Publish samurai.php into config folder
php artisan vendor:publish --tag=Samurai
Getting Started
To create a new theme
php artisan samurai:make-init
Creating a new theme with default configs
php artisan samurai:make-theme my-vendor/my-theme
Creating a new include
php artisan samurai:make-include my-include my-vendor/my-theme
The theme param is optional. If not informed, assume the default theme automatically.
To edit your include file, go to themes/my-vendor/my-theme/src/my-include/my-include-include.blade.php
Creating a new component
php artisan samurai:make-component my-component my-vendor/my-theme
The theme param is optional. If not informed, assume the default theme automatically.
To edit your include file, go to themes/my-vendor/my-theme/src/my-component/my-component-component.blade.php
Using theme in your project
To publish your assets and define your theme as current:
php artisan samurai:use my-vendor/my-theme
Using components into blade files
To use component in your view.blade.php, use:
@myComponent() My content inside @endmyComponent()
Now, also, you can use Blade UI notation too:
<x-my-component> My content inside </x-my-component>
Using includes into blade files
To use include in your view.blade.php, use:
@myInclude()
Now, also, you can use Blade UI notation too:
<x-my-include />
Load assets into theme files
To import any file into your theme(like css, js, imgs), use directive @public.
E.g:
<script src="@public('js/index.js')" />
Created by Giuliano Sampaio with ❤️, ☕ and 🍺!
maestriam/samurai 适用场景与选型建议
maestriam/samurai 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 106 次下载、GitHub Stars 达 5, 最近一次更新时间为 2020 年 04 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 maestriam/samurai 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 maestriam/samurai 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 106
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 5
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2020-04-16
