Skip to content

Instantly share code, notes, and snippets.

@Vheissu
Created September 1, 2014 05:40
Show Gist options
  • Save Vheissu/209e3adec81c51ba69bb to your computer and use it in GitHub Desktop.
Save Vheissu/209e3adec81c51ba69bb to your computer and use it in GitHub Desktop.
<?php
class RoleTableSeeder extends Seeder {
public function run()
{
// Delete any content in the roles table
DB::table('roles')->delete();
$role_data = array(
array('role_name' => "Administrator", 'role_description' => "Administrators can do everything on the site"),
array('role_name' => "Moderator", 'role_description' => "Can edit, approve or reject content"),
array('role_name' => "Basic", 'role_description' => "Just a basic user")
);
foreach ($role_data AS $role) {
Role::create($role);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment