app/Http/Controllers/PostController.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()
    {
        $post=Post::orderBy('id','asc')->paginate(5);
        return view('posts.index')->withPost($post);
    }
public function index ( ) { $ post = Post :: orderBy ( 'id' , 'asc' ) -> paginate ( 5 ) ; return view ( 'posts.index' ) -> withPost ( $ post ) ; }
Display a listing of the resource.
Display a listing of the resource .