Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save rdgutierrez/4c7b4cb5881c555c628bc3824608aa55 to your computer and use it in GitHub Desktop.

Select an option

Save rdgutierrez/4c7b4cb5881c555c628bc3824608aa55 to your computer and use it in GitHub Desktop.
Ceating Roles in Laravel 5.4 with httpoz/roles
Route::get('roles', function(){
\HttpOz\Roles\Models\Role::create([
'name' => 'Admin',
'slug' => 'admin',
'description' => 'Custodians of the system.'
]);
\HttpOz\Roles\Models\Role::create([
'name' => 'Dealer',
'slug' => 'dealer',
'description' => 'Wholesale Reseller of the service.'
]);
\HttpOz\Roles\Models\Role::create([
'name' => 'Provider',
'slug' => 'provider',
'description' => 'Retailer of the service.'
]);
\HttpOz\Roles\Models\Role::create([
'name' => 'Client',
'slug' => 'client',
'description' => 'Final Client.'
]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment