Пример #1
0
 /**
  * 数据绑定到视图。
  *
  * @param  View  $view
  * @return void
  */
 public function compose(View $view)
 {
     $category = CategoryRepository::where('model', '=', '2')->get();
     $about = DocumentRepository::byIdOrNameMark('about')->first();
     $contact = DocumentRepository::byIdOrNameMark('contact')->first();
     $config = config('home');
     $view->with(['homeconfig' => $config, 'Categories' => $category, 'about' => $about, 'contact' => $contact]);
 }
Пример #2
0
 /**
  * 当前分类获取
  *
  * @return Array
  */
 public function currentCategory($categoryid)
 {
     return CategoryRepository::byMark($categoryid)->first();
 }