app/Http/Controllers/AdminController.php
/**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
Show the application dashboard.
@return \Illuminate\Http\Response
Show the application dashboard . @return \ Illuminate \ Http \ Response
public function index()
    {
        $listaPaginas = json_encode([
            ["titulo" => "Admin", "url" => ''],
        ]);
        $qtdArtigos = Artigo::count();
        $qtdUsuarios = User::count();
        $qtdAutores = User::where('autor','=','S')->count();
        $qtdAdmins = User::where('admin','=','S')->count();
        return view('admin', compact('listaPaginas', 'qtdArtigos', 'qtdUsuarios', 'qtdAutores', 'qtdAdmins'));
    }
public function index ( ) { $ listaPaginas = json_encode ( [ [ " titulo " => " Admin " , " url " => '' ] , ] ) ; $ qtdArtigos = Artigo :: count ( ) ; $ qtdUsuarios = User :: count ( ) ; $ qtdAutores = User :: where ( 'autor' , '=' , 'S' ) -> count ( ) ; $ qtdAdmins = User :: where ( 'admin' , '=' , 'S' ) -> count ( ) ; return view ( 'admin' , compact ( 'listaPaginas' , 'qtdArtigos' , 'qtdUsuarios' , 'qtdAutores' , 'qtdAdmins' ) ) ; }
Show the application dashboard.
Show the application dashboard .