netsells/chain-an-able

本包提供了一个简单易用的可链式HTML构建器,易于集成到任何平台或CMS。

dev-master 2016-10-03 21:14 UTC

This package is auto-updated.

Last update: 2024-09-08 08:10:23 UTC


README

Latest Version Build Status Quality Score Software License Total Downloads

本包提供了一个简单易用的可链式HTML构建器,易于集成到任何平台或CMS。

目前处于开发中

目前仅兼容Laravel 5.3和php7。

用法

{!! $karoway->text('header.title')->wrap('h1.title') !!}
{!! $karoway->image('header.image')->alt('This is the hero image')->classes('image col-md-12') !!}

安装

要安装,只需通过composer要求包。

composer require netsells/chain-an-able dev-master

发布运行所需的配置文件。

php artisan vendor:publish --provider='Netsells\Karoway\KarowayServiceProvider'

设置

这是存储页面属性表的列名。

    'database' => [
        'key_field' => 'key',
        'value_field' => 'value',
    ],

这是存储页面和返回页面属性的模型及其关系。

'models' => [
    'page' => [
        'model' => Page::class,
        'relation' => 'properties',
    ]
]