noistudio/admin-blocks

Laravel Blocks系统,用于集成到管理面板中

dev-master 2023-09-30 11:59 UTC

This package is auto-updated.

Last update: 2024-08-30 01:34:18 UTC


README

laravel dev-version的Blocks系统

  1. 安装包:composer require noistudio/admin-blocks
  2. 发布文件:php artisan vendor:publish --tag=admin_blocks
  3. 运行迁移:php artisan migrate
  4. 设置配置:/config/admin_blocks

运行选项

选项1 Blade指令

选项2 从文本动态运行

如果您想替换文本中的所有特殊标签,可以使用特质

`<?php

namespace App\Http\Controllers\web;

use AdminBlocks\Traits\HasBlockRender;

class HomeController { use HasBlockRender; function index(){

  $data=array();
  $data['test']="@load_position('test_pos')";
  return $this->render("welcome",$data);

} } `