public function testDestroy()
 {
     $series = factory(Series::class)->create();
     $this->action('DELETE', 'Admin\\SeriesController@destroy', $series);
     $this->assertRedirectedToRoute('admin.series.index');
     $this->assertEquals(0, Series::count());
 }
Пример #2
0
 /**
  * GET /admin/users
  * Display a listing of users.
  *
  * @return \Illuminate\View\View
  */
 public function index()
 {
     $postsCount = Post::count();
     $seriesCount = Series::count();
     $projectsCount = Project::count();
     $usersCount = User::count();
     return view('admin.pages.index', compact('postsCount', 'seriesCount', 'projectsCount', 'usersCount'))->withTitle('Admin');
 }