/** * Test samples for all models have been seeded. */ public function testModelSeed() { $message = 'Haven\'t you forgotten to run artisan migrate and db::seed?'; $this->assertNotEmpty(Author::all(), $message); $this->assertNotEmpty(Comment::all(), $message); $this->assertNotEmpty(Post::all(), $message); $this->assertNotEmpty(Site::all(), $message); }
/** * Test samples for all models have been seeded. */ public function testModelSeed() { $message = 'Haven\'t you forgotten to run artisan migrate and db::seed?'; $this->assertNotEmpty(Author::all(), $message); $this->assertNotEmpty(Comment::all(), $message); $this->assertNotEmpty(Post::all(), $message); $this->assertNotEmpty(Site::all(), $message); $isAuthenticated = Auth::attempt(['email' => UsersTableSeeder::SAMPLE_LOGIN, 'password' => UsersTableSeeder::SAMPLE_PASSWORD]); $this->assertTrue($isAuthenticated); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $this->checkParametersEmpty(); return $this->getResponse(Site::all()); }
public function all() { return \App\Models\Site::all(); }
/** * Display a listing of the resource. * * @return Response */ public function index() { return $this->getResponse(Site::all()); }