Пример #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
 /**
  * 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
 /**
  * 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
 /**
  * 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
 /**
  * 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
 /**
  * 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
 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')));
 }