app/Http/Controllers/ProjetoController.php
/**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
Show the application dashboard.
@return \Illuminate\Contracts\Support\Renderable
Show the application dashboard . @return \ Illuminate \ Contracts \ Support \ Renderable
public function index(Request $request, $slug)
    {
        if(Projeto::where('slug', $slug)->count() <= 0){
            return abort(404);
        }
        $numeroDeArquivos = ModuloArquivo::all()->count();
        $project = Projeto::with(['categoria', 'colaboradores', 'colaboradores.perfil', 'modulos.arquivos'])->first();
        $project->numeroDeArquivos = $numeroDeArquivos;
        return view('projeto', ['projeto' => $project]);
    }
public function index ( Request $ request , $ slug ) { if ( Projeto :: where ( 'slug' , $ slug ) -> count ( ) <= 0 ) { return abort ( 404 ) ; } $ numeroDeArquivos = ModuloArquivo :: all ( ) -> count ( ) ; $ project = Projeto :: with ( [ 'categoria' , 'colaboradores' , 'colaboradores.perfil' , 'modulos.arquivos' ] ) -> first ( ) ; $ project -> numeroDeArquivos = $ numeroDeArquivos ; return view ( 'projeto' , [ 'projeto' => $ project ] ) ; }
Show the application dashboard.
Show the application dashboard .