示例#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');
 }
 /**
  * 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'));
 }
 /**
  * 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')));
 }