public function run() { $faker = Faker::create('en_GB'); foreach (range(1, 1) as $index) { Trust::create(['name' => 'The Hastings Academies Trust']); } }
/** * 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'); }
/** * 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'); }