app/Http/Controllers/HomeController.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()
    {
        $posts = Post::orderBy("fecha_de_creacion", "DESC")->limit(10)->select("id", "titulo")->get();
        return view("Home", compact("posts"));
    }
public function index ( ) { $ posts = Post :: orderBy ( " fecha_de_creacion " , " DESC " ) -> limit ( 10 ) -> select ( " id " , " titulo " ) -> get ( ) ; return view ( " Home " , compact ( " posts " ) ) ; }
Display a listing of the resource.
Display a listing of the resource .