app/Http/Controllers/ArticleController.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()
    {
        $data['articles'] = Article::with('categories')->get();
        return view('admins.articles.index')->with($data);
    }
public function index ( ) { $ data [ 'articles' ] = Article :: with ( 'categories' ) -> get ( ) ; return view ( 'admins.articles.index' ) -> with ( $ data ) ; }
Display a listing of the resource.
Display a listing of the resource .