/** * Run the migrations. * * @return void */ public function up() { $admin = Role::admin(); $member = Role::member(); $acl = ACL::make('orchestra/story'); $acl->roles()->attach([$member->name, $admin->name]); $acl->actions()->attach(['Create Post', 'Update Post', 'Delete Post', 'Manage Post', 'Create Page', 'Update Page', 'Delete Page', 'Manage Page']); $acl->allow($member->name, ['Create Post', 'Update Post', 'Delete Post', 'Create Page', 'Update Page', 'Delete Page']); $acl->allow($admin->name, ['Create Post', 'Update Post', 'Delete Post', 'Manage Post', 'Create Page', 'Update Page', 'Delete Page', 'Manage Page']); }
/** * Run the migrations. * * @return void */ public function up() { $admin = Role::admin(); $member = Role::member(); $acl = Acl::make('hostbrute/uppy'); $acl->roles()->attach([$admin->name, $member->name]); //set up actions, php 5.4 style baby $adminActions = ['Manage Uppy']; $acl->actions()->attach($adminActions); $acl->allow($admin->name, $adminActions); }