longnd/backpacksplit

1.4 2019-05-20 04:49 UTC

This package is auto-updated.

Last update: 2024-04-20 15:48:46 UTC


README

Latest Version on Packagist Total Downloads Build Status StyleCI

This is where your description should go. Take a look at contributing.md to see a to do list.

Installation

Via Composer

$ composer require longnd/backpacksplit

Usage

Optional you can publish the configuration to provide a different service provider stub. The default is here.

$ php artisan vendor:publish --provider="LongND\BackpackSplit\BackpackSplitServiceProvider"

With DemoCrudController in App\Http\Controller\Admin\DemoCrudController we edit it if you have a default CRUD Controller:

namespace App\Http\Controllers\Admin;

use Backpack\CRUD\app\Http\Controllers\DemoController;


// VALIDATION: change the requests to match your own file names if you need form validation
use App\Http\Requests\DemoRequest as StoreRequest;
use App\Http\Requests\DemoRequest as UpdateRequest;
use Backpack\CRUD\CrudPanel;
use LongND\BackpackSplit\Traits\SetupModal;

/**
 * Class StoreCrudController
 * @package App\Http\Controllers\Admin
 * @property-read CrudPanel $crud
 */
class StoreCrudController extends CrudController
{
    use SetupModal;
    public function setup()
    {
        //code-here....
        $this->setupModal();
        //code-here...
    }
}

and if you want to create new backpack controller with modal crud you try:

$ php artisan backpack:crud demo --option=modal

to use ModalCRUD and result:

image

####OR

namespace App\Http\Controllers\Admin;

use Backpack\CRUD\app\Http\Controllers\DemoController;


// VALIDATION: change the requests to match your own file names if you need form validation
use App\Http\Requests\DemoRequest as StoreRequest;
use App\Http\Requests\DemoRequest as UpdateRequest;
use Backpack\CRUD\CrudPanel;
use LongND\BackpackSplit\Traits\SetupSplit;

/**
 * Class StoreCrudController
 * @package App\Http\Controllers\Admin
 * @property-read CrudPanel $crud
 */
class StoreCrudController extends CrudController
{
    use SetupSplit;
    public function setup()
    {
        //code-here....
        $this->setupSplit('col-md-8');
        //code-here...
    }
}

and if you want to create new backpack controller with split crud you try:

$ php artisan backpack:crud demo --option=split

to use SplitCRUD and result:

image

Change log

Please see the changelog for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.