예제 #1
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'));
 }
예제 #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();
     $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'));
 }
 public function search()
 {
     $headline = Request::input('headline');
     return View('back.tasklist.search')->with('tasklists', Tasklist::where('headline', 'like', '%' . $headline . '%')->paginate(7));
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if (Tasklist::destroy($id)) {
         return "Tasklist deleted successfully.";
     } else {
         return $this->response->error('Tasklist does not exist.', 404);
     }
 }