2017 © Pedro Peláez
 

library rapyd-datatree

image

tacone/rapyd-datatree

  • Sunday, December 20, 2015
  • by tacone
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

DataTree for Rapyd

If you use Laravel 5 you don't need this repository, the datatree has been merged in the core of Rapyd!, (*1)

If you use Laravel 4.2 and Rapyd you can use this repo to add the DataTree to your app., (*2)

Installation

Before beginning, you need to add to your composer Baum\Baum as we don't add it automatically for you., (*3)

Add it to composer, add the service provider and publish the assets., (*4)

Add the service provider to app.php, (*5)

        'Tacone\RapydDataTree\RapydDataTreeServiceProvider',

Add the css and js hooks in your template:, (*6)

In the <head>:, (*7)

    {{ DataTree::styles() }}

At the end of the <body>:, (*8)

    {{ DataTree::scripts() }}

Sample usage

use Tacone\RapydDataTree\DataTree;

class MyController extends Controller
{
    public function anyIndex($rootId = null)
    {
        $rootId or App::abort(404);
        $root = Menu::find($rootId) or App::abort(404);

        $tree = DataTree::source($root);
        $tree->add('title');
        $tree->edit("/admin/menu/edit", 'Edit', 'modify|delete');

        return View::make('admin/menu/index', compact('tree'));
    }
}

The Versions

20/12 2015

dev-master

9999999-dev

  Sources   Download

The Requires

 

by Avatar tacone

03/12 2015

0.1.1

0.1.1.0

  Sources   Download

The Requires

 

by Avatar tacone

03/12 2015

0.1

0.1.0.0

  Sources   Download

The Requires

 

by Avatar tacone