Example #1
0
 public function run()
 {
     $faker = Faker::create('en_GB');
     foreach (range(1, 1) as $index) {
         Trust::create(['name' => 'The Hastings Academies Trust']);
     }
 }
Example #2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(Request $request)
 {
     $trusts = Trust::all();
     if ($trusts) {
         return $this->respondWithCollection($trusts, new TrustTransformer());
     }
     return $this->errorNotFound('No trusts found');
 }
Example #3
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::statement('SET FOREIGN_KEY_CHECKS=0;');
     DomainController::truncate();
     Trust::truncate();
     Site::truncate();
     Role::truncate();
     Permission::truncate();
     Module::truncate();
     DB::statement('SET FOREIGN_KEY_CHECKS=1;');
     Model::unguard();
     $this->call('DomainControllersTableSeeder');
     $this->call('TrustsTableSeeder');
     $this->call('SitesTableSeeder');
     $this->call('RolesTableSeeder');
     $this->call('ModulesTableSeeder');
     $this->call('PermissionsTableSeeder');
 }