/**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $category = Category::all();
     $blog = Blog::all();
     $images = Auth::user()->getPhoto();
     return view('beranda.home', ['images' => $images])->with('blog', $blog);
 }
 public function getBlog()
 {
     $dataMenu = new Main();
     $dataBlog = new Blog();
     $dataMenu = Main::all();
     $dataBlog = Blog::all();
     return view('main.blog', compact('dataMenu', 'dataFitur', 'dataBlog'));
 }
 public function allBlogs()
 {
     return json_encode(Blog::all());
 }