定制 furious-developer/lara-bit 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

furious-developer/lara-bit

Composer 安装命令:

composer require furious-developer/lara-bit

包简介

Create Laravel views (blade template) using 'php artisan' command-line interface

README 文档

README

About LaraBit

Have you ever wonder to create Laravel views (Blade Templates) using the same type of artisan commands that you usually use to create new controllers, models and migrations etc.

LaraBit extends the power of Laravel Artisan tool and give you the command line interface to create new blade templates really easy.

Installation

install it with composer

composer require furious-developer/lara-bit

Getting Started

Create new blade template:

To create new blade template at the root of the view folder use the command mention below.

php artisan make:view <NameOfTheTemplate>

Example:

if we want to create the "index.blade.php" inside the view folder then use this command and just specify the file name without any file extension.

php artisan make:view index

This command will create the index.blade.php file inside view folder and LaraBit will also output the Absolute Path of the file on the console.

Define template type option:

LaraBit comes with 2 type of Templates

  • basic (Default Type) : It will generate the template with basic HTML code.
  • advance : It will generate the template with HTML code and also include some useful HTML tags as well.

commands:

php artisan make:view index1 --type basic

---- or ----

php artisan make:view index2 --type advance

or use shortcut

php artisan make:view index3 -t basic

---- or ----

php artisan make:view index4 -t advance

Create new Blade Template inside Single/Multiple Folders

In order to create new blade template inside folder prefix the filename with the folder name and dot (.)

LaraBit use the same syntax that view() function use to call a view.

php artisan make:view layout.index

-- define more folder lavel in same way

php artisan make:view folder1.folder2.index

If the Folder doesn't exists then It will create the new Folder(s). If you receive any error after running the above command then change the file permission of the views folder or Manually create the require folders and then run the command again.

Modify Templates

Sometimes we wish to Modify the templates that comes with the LaraBit. we can easily do that by follow the bellow steps.

run this command

php artisan vendor:publish

Then find the line mention below on the console and press the number that is written in-front of it

Provider: FuriousDeveloper\LaraBit\LaraBitServiceProvider

It will generate the basic.blade.php and advance.blade.php inside the "\resources\views\vendor\larabit" folder. Modify the template as per your requirements.

Add & Use Custom Templates

Sometimes we wish to use our own templates instead of using the templates that comes with LaraBit.

Follow the Modify Template Steps then inside "\resources\views\vendor\larabit" place your blade template that you want to use.

Example:

if we wanted to use example.blade.php then we have to place/create this template inside "\resources\views\vendor\larabit" folder then to generate new blade file using your template use the command mention below.

php artisan make:view index6 --type example

---- or ----

php artisan make:view index7 -t example

furious-developer/lara-bit 适用场景与选型建议

furious-developer/lara-bit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 391 次下载、GitHub Stars 达 5, 最近一次更新时间为 2021 年 10 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「generator」 「php」 「template」 「command」 「laravel」 「views」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 furious-developer/lara-bit 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 furious-developer/lara-bit 我们能提供哪些服务?
定制开发 / 二次开发

基于 furious-developer/lara-bit 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 391
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-10-10