コード例 #1
0
 /**
  * Display the home page.
  *
  * @return Response
  */
 public function index()
 {
     $posts = $this->blog_gestion->indexFront($this->nbrPages);
     $links = $posts->render();
     return view('front.index', compact('posts', 'links'));
     // return view('front.index');
 }
コード例 #2
0
 /**
  * Show the admin panel.
  *
  * @param  App\Repositories\ContactRepository $contact_gestion
  * @param  App\Repositories\BlogRepository $blog_gestion
  * @param  App\Repositories\CommentRepository $comment_gestion
  * @return Response
  */
 public function admin(ContactRepository $contact_gestion, BlogRepository $blog_gestion, CommentRepository $comment_gestion)
 {
     $nbrMessages = $contact_gestion->getNumber();
     $nbrUsers = $this->user_gestion->getNumber();
     $nbrPosts = $blog_gestion->getNumber();
     $nbrComments = $comment_gestion->getNumber();
     return view('back.index', compact('nbrMessages', 'nbrUsers', 'nbrPosts', 'nbrComments'));
 }
コード例 #3
0
ファイル: AdminController.php プロジェクト: lvip/Petfood
 /**
  * Show the media panel.
  *
  * @return Response
  */
 public function filemanager(ContactRepository $contact_gestion, BlogRepository $blog_gestion, CommentRepository $comment_gestion)
 {
     $url = config('medias.url');
     $nbrMessages = $contact_gestion->getNumber();
     $nbrUsers = $this->user_gestion->getNumber();
     $nbrPosts = $blog_gestion->getNumber();
     $nbrComments = $comment_gestion->getNumber();
     return view('back.filemanager', compact('url', 'nbrMessages', 'nbrUsers', 'nbrPosts', 'nbrComments'));
 }
コード例 #4
0
ファイル: RuController.php プロジェクト: hramose/VTO-Admin
 /**
  * Show the admin panel.
  *
  * @param  App\Repositories\ContactRepository $contact_gestion
  * @param  App\Repositories\BlogRepository $blog_gestion
  * @param  App\Repositories\CommentRepository $comment_gestion
  * @return Response
  */
 public function index(BlogRepository $blog_gestion, CommentRepository $comment_gestion)
 {
     $nbrPosts = $blog_gestion->getNumber();
     $nbrComments = $comment_gestion->getNumber();
     $tasklistall = Tasklist::all();
     Session::put('tasklisttkey', $tasklistall);
     $taskcount = Tasklist::count();
     Session::put('taskcountkey', $taskcount);
     return view('back.partials.ru', compact('nbrPosts', 'nbrComments', 'taskcountkey', 'tasklisttkey'));
 }
コード例 #5
0
 /**
  * Find search in blog
  *
  * @param  App\Http\Requests\SearchRequest $request
  * @return Response
  */
 public function search(SearchRequest $request)
 {
     $search = $request->input('search');
     $posts = $this->blog_gestion->search($this->nbrPages, $search);
     $links = $posts->setPath('')->appends(compact('search'))->render();
     $info = trans('front/blog.info-search') . '<strong>' . $search . '</strong>';
     $tasks = $this->tasklist_gestion->where('headline', '=', '%$search%')->get();
     $tasks = $this->tasklist_gestion->where('tasklist.headline', 'LIKE', "%{$search}%")->orWhere('tasklist.info', 'LIKE', "%{$search}%")->get();
     return view('back.search.index', compact('posts', 'links', 'info', 'tasks'));
 }
コード例 #6
0
ファイル: AdminController.php プロジェクト: hramose/VTO-Admin
 /**
  * Show the admin panel.
  *
  * @param  App\Repositories\ContactRepository $contact_gestion
  * @param  App\Repositories\BlogRepository $blog_gestion
  * @param  App\Repositories\CommentRepository $comment_gestion
  * @return Response
  */
 public function admin(ContactRepository $contact_gestion, BlogRepository $blog_gestion, CommentRepository $comment_gestion)
 {
     $nbrMessages = $contact_gestion->getNumber();
     $nbrUsers = $this->user_gestion->getNumber();
     $nbrPosts = $blog_gestion->getNumber();
     $nbrComments = $comment_gestion->getNumber();
     $tasklistall = Tasklist::all();
     Session::put('tasklisttkey', $tasklistall);
     $taskcount = Tasklist::count();
     Session::put('taskcountkey', $taskcount);
     return view('back.index', compact('nbrMessages', 'nbrUsers', 'nbrPosts', 'nbrComments', 'taskcountkey', 'tasklisttkey'));
 }
コード例 #7
0
 /**
  * Display a listing of the resource.
  *
  * @param  Illuminate\Http\Request $request
  * @return Response
  */
 public function indexOrder(Request $request)
 {
     /*
     $statut = $this->user_control->getStatut();
     */
     $posts = $this->blog_control->index(10, null, $request->name, $request->sens);
     $category = $this->category_control->index(10, $request->name, $request->sens);
     $links = $posts->appends(['name' => $request->name, 'sens' => $request->sens]);
     if ($request->ajax()) {
         return response()->json(['view' => view('kadmin.category.table', compact('statut', 'category'))->render(), 'links' => $links->setPath('order')->render()]);
     }
     $links->setPath('')->render();
     $order = (object) ['name' => $request->name, 'sens' => 'sort-' . $request->sens];
     return view('kadmin.category.index', compact('category', 'links', 'order'));
 }
コード例 #8
0
ファイル: BlogController.php プロジェクト: axlyody/mikoci
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $post = $this->blog_gestion->getById($id);
     $this->authorize('change', $post);
     $this->blog_gestion->destroy($post);
     return redirect('blog')->with('ok', trans('back/blog.destroyed'));
 }
コード例 #9
0
ファイル: BlogController.php プロジェクト: axlyody/mikoci
 /**
  * Find search in blog
  *
  * @param  App\Http\Requests\SearchRequest $request
  * @return Response
  */
 public function search(SearchRequest $request)
 {
     $search = $request->input('search');
     $posts = $this->blog_gestion->search($this->nbrPages, $search);
     $links = view('pagination.default', ['paginator' => $posts]);
     $info = trans('front/blog.info-search') . '<strong>' . $search . '</strong>';
     return view('front.blog.index', compact('posts', 'links', 'info'));
 }
コード例 #10
0
 /**
  * Find search in blog
  *
  * @param  App\Http\Requests\SearchRequest $request
  * @return Response
  */
 public function search(SearchRequest $request)
 {
     $search = $request->input('search');
     $posts = $this->blog_gestion->search($this->nbrPages, $search);
     $links = $posts->setPath('')->appends(compact('search'))->render();
     $info = trans('front/blog.info-search') . '<strong>' . $search . '</strong>';
     return view('front.blog.index', compact('posts', 'links', 'info'));
 }
コード例 #11
0
 /**
  * Category
  */
 public function searchCategory()
 {
     $category = $request->input('category');
     $posts = $this->blog_gestion->search($this->nbrPages, $category);
     $links = $posts->appends(compact('category'))->render();
     $info = trans('front/blog.info-search') . '<strong>' . $category . '</strong>';
     return view('front.blog.index', compact('posts', 'links', 'info'));
 }
コード例 #12
0
ファイル: FoodController.php プロジェクト: lvip/Petfood
 public function edit(UserRepository $user_gestion, $id)
 {
     $url = config('medias.url');
     return view('back.blog.edit', array_merge($this->blog_gestion->edit($id), compact('url')));
 }