app/Http/Controllers/PeliculaController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $peliculas = Pelicula::withCount('generos','actores')->with("usuario:id,name")->orderByDesc('anio')->orderBy('titulo')->paginate(10);
        return view('panel.peliculas.index', compact('peliculas'));
    }
public function index ( ) { $ peliculas = Pelicula :: withCount ( 'generos' , 'actores' ) -> with ( " usuario:id,name " ) -> orderByDesc ( 'anio' ) -> orderBy ( 'titulo' ) -> paginate ( 10 ) ; return view ( 'panel.peliculas.index' , compact ( 'peliculas' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .