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()
    {
      $posts = Post::all();
      $columns = Schema::getColumnListing('posts');
      return view('posts_list', ['posts'=>$posts, 'columns'=>$columns]);
    }
public function index ( ) { $ posts = Post :: all ( ) ; $ columns = Schema :: getColumnListing ( 'posts' ) ; return view ( 'posts_list' , [ 'posts' => $ posts , 'columns' => $ columns ] ) ; }
Display a listing of the resource.
Display a listing of the resource .