{"action":"created","issue":{"url":"https://api.github.com/repos/sleeping-owl/admin/issues/162","labels_url":"https://api.github.com/repos/sleeping-owl/admin/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/sleeping-owl/admin/issues/162/comments","events_url":"https://api.github.com/repos/sleeping-owl/admin/issues/162/events","html_url":"https://github.com/sleeping-owl/admin/issues/162","id":92782415,"number":162,"title":"Multiple Admins","user":{"login":"rahul-rkt","id":1763845,"avatar_url":"https://avatars.githubusercontent.com/u/1763845?v=3","gravatar_id":"","url":"https://api.github.com/users/rahul-rkt","html_url":"https://github.com/rahul-rkt","followers_url":"https://api.github.com/users/rahul-rkt/followers","following_url":"https://api.github.com/users/rahul-rkt/following{/other_user}","gists_url":"https://api.github.com/users/rahul-rkt/gists{/gist_id}","starred_url":"https://api.github.com/users/rahul-rkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahul-rkt/subscriptions","organizations_url":"https://api.github.com/users/rahul-rkt/orgs","repos_url":"https://api.github.com/users/rahul-rkt/repos","events_url":"https://api.github.com/users/rahul-rkt/events{/privacy}","received_events_url":"https://api.github.com/users/rahul-rkt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-03T03:26:55Z","updated_at":"2015-09-28T03:22:20Z","closed_at":"2015-07-06T09:36:08Z","body":"How to extend the Admin tables and Models to make different levels of admin with specific set of features, like say SuperAdmins, Moderators, Reviewers etc?\r\n\r\nAlso, is the artisan command the only possible option for creating new admins? Is something like creating a new admin by existing admin possible? Such that when an existing admin fills up a form with an email, a token is generated and then the receiver can use that to fill up a master form, set passwords n all.\r\n\r\nThank you."},"comment":{"url":"https://api.github.com/repos/sleeping-owl/admin/issues/comments/143629405","html_url":"https://github.com/sleeping-owl/admin/issues/162#issuecomment-143629405","issue_url":"https://api.github.com/repos/sleeping-owl/admin/issues/162","id":143629405,"user":{"login":"avilaj","id":2974817,"avatar_url":"https://avatars.githubusercontent.com/u/2974817?v=3","gravatar_id":"","url":"https://api.github.com/users/avilaj","html_url":"https://github.com/avilaj","followers_url":"https://api.github.com/users/avilaj/followers","following_url":"https://api.github.com/users/avilaj/following{/other_user}","gists_url":"https://api.github.com/users/avilaj/gists{/gist_id}","starred_url":"https://api.github.com/users/avilaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avilaj/subscriptions","organizations_url":"https://api.github.com/users/avilaj/orgs","repos_url":"https://api.github.com/users/avilaj/repos","events_url":"https://api.github.com/users/avilaj/events{/privacy}","received_events_url":"https://api.github.com/users/avilaj/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T03:22:20Z","updated_at":"2015-09-28T03:22:20Z","body":"A small modification from the script of eugenem\r\n```php\r\nAdmin::model('SleepingOwl\\AdminAuth\\Entities\\Administrator')\r\n    ->title('Administrators')\r\n    ->display(function ()\r\n    {\r\n        $display = AdminDisplay::datatables();\r\n        $display->order([[0, 'desc']]);\r\n        $display->columns([\r\n            Column::string('id')->label('ID'),\r\n            Column::string('name')->label('Name'),\r\n            Column::string('username')->label('Username'),\r\n        ]);\r\n        return $display;\r\n    })->createAndEdit(function ()\r\n    {\r\n        $form = AdminForm::form();\r\n        $form->items([\r\n            FormItem::text('username', 'Username'),\r\n            FormItem::text('name', 'Name'),\r\n            FormItem::custom()->display(function ($instance)\r\n            {\r\n                return view('form.password_field', ['instance' => $instance]);\r\n            })->callback(function ($instance)\r\n            {\r\n                $instance->password = Input::get('password');\r\n            }),\r\n        ]);\r\n        return $form;\r\n    });\r\n```"}}