public function index() { $auth = 0; $user = 0; if (Auth::check()) { $auth = 1; $user = Auth::user()->name; } $blogs = Blogs::all(); return view('index', ['aut' => $auth, 'user' => $user, 'records' => $blogs]); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $blogList = Blogs::all(); return \View::make('admin.blogs.index', ['blogList' => $blogList]); }