app/Http/Controllers/PostsController.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 = DB::table('posts')->paginate(3);
        return view('posts.index',['post' => $post]);
    }
public function index ( ) { $ post = DB :: table ( 'posts' ) -> paginate ( 3 ) ; return view ( 'posts.index' , [ 'post' => $ post ] ) ; }
Display a listing of the resource.
Display a listing of the resource .