Exemplo n.º 1
0
 /**
  * Display Page
  */
 public function page($id, Settings $settings, Menu $menu, Posts $post)
 {
     $slogan = $settings->whereName('slogan_fr')->first();
     $menuItems = $menu->getAllMenuItems();
     $pageTitle = $menu->find($id)->title_fr;
     $postData = $post->whereid($id)->get();
     return view('page')->withSlogan($slogan)->withMenu($menuItems)->withPageTitle($pageTitle)->withPosts($postData);
 }
Exemplo n.º 2
0
 /**
  * Show all posts
  */
 public function show(Posts $PostsModel, Menu $MenuModel)
 {
     $menus = $MenuModel->getAllMenuItems();
     $posts = $PostsModel->all();
     return view('admin.post.show')->withPageTitle('Articles')->withPosts($posts)->withMenus($menus);
 }