承接 filefabrik/bootraiser 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

filefabrik/bootraiser

最新稳定版本:v2.0.2

Composer 安装命令:

composer require filefabrik/bootraiser

包简介

Laravel boot helper for custom packages

README 文档

README

Booting Utility for Laravel custom Packages

Features

  • Bootraiser saves you all the booting|publishable boilerplate required for a Laravel package.
  • Bootraiser can be easily integrated into existing packages.
  • Bootraiser is completely based on laravel
  • no “extra-magic” packages necessary

If you write your own Laravel packages, parts of your package usually have to be booted in Laravel.

This can sometimes cost an unnecessary amount of time.

Filefabrik-Bootraiser provides you with all important Laravel boot methods immediately and without much configuration effort. It is also quite cool if the Laravel “publish” methods are supported so that views|translations|configs and so on, overrides can be published later.

Bootraiser strictly uses SemVer so please use ~2.0

Installation:

composer require "filefabrik/bootraiser:~2.0"

Modify your YourPackageServiceProvider.php

Then go to your provider file, which is usually under:

~/packages/your-package/src/Providers/YourPackageServiceProvider.php

YourPackageServiceProvider.php file looks like this:

<?php

namespace YourCompanyVendor\YourPackage\Providers;

use Illuminate\Support\ServiceProvider;

class YourPackageServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        parent::register();
        Raiser::forProvider($this)
              ->loadConfigs()
        ;
    }

    public function boot(): void
    {
        Raiser::forProvider($this)
              ->publishConfigs()
              ->migrations()
              ->routes()
              ->translations()
              ->views()
              ->components()
              ->commands()
              ->livewire()
        ;
    }

}

Then which components you want to boot with Bootraiser as an Array or via Methods as above shown.

Note: You can enter all parts as boot parts. Bootraiser only boots the parts that are actually in your package.

The following "load" mechanisms are available to you:

  • configs
  • routes
  • migrations
  • translations
  • views + view components
  • commands
  • livewire
  • seeder, factory
  • events, listener

统计信息

  • 总下载量: 741
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-20