Skip to content

Instantly share code, notes, and snippets.

@SCIF
Last active January 28, 2016 07:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SCIF/5c4c8560bf9d1676d872 to your computer and use it in GitHub Desktop.
Save SCIF/5c4c8560bf9d1676d872 to your computer and use it in GitHub Desktop.
SleepingOwl admin with experimental relation support and laravel 5.2

First of all: add next section to composer.json:

  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/SCIF/admin"
    }
  ],

Add package by composer: composer require globalsdd/admin dev-development.

Next installation steps similar like in docs: http://sleeping-owl.github.io/v3/

You can use belongsTo and hasOne relations in FormItem:

    ->createAndEdit(function($id) {
        $form = AdminForm::form();
        $form->items([
            FormItem::text('name', 'Name'),
            FormItem::text('page.slug', 'Slug'),
            FormItem::text('page.title', 'Title'),

Page is belongsTo relation of main described model.

If you will find bug or just interested to develop it — create issue ticket at https://github.com/SCIF/admin/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment