예제 #1
0
 public function home(Content $content, Ticket $ticket, User $user, Application $application, BusinessUnit $businessUnit)
 {
     //FIND USERS WITH SUBMITTED TICKETS
     $users_with_tickets = User::has('tickets')->get();
     //USERS WHO ARE NOT ADMIN
     $non_admin_users = $user->notAdmin()->get();
     $admin_users = $user->admins()->get();
     $tickets_all = $ticket->all()->count();
     $tickets_c = $ticket->completed()->get()->count();
     $prj_brief_records = $content->latest()->brief()->get();
     $prj_notes_records = $content->latest()->notes()->get();
     $status_records = $content->latest()->status()->get();
     $applications = $application->get();
     $users = $user->get();
     return view('pages.home', compact('prj_notes_records', 'status_records', 'tickets_c', 'tickets_all', 'users_with_tickets', 'applications', 'non_admin_users', 'admin_users', 'users'));
 }
예제 #2
0
 /**
  * Show the application dashboard.
  *
  * @return Response
  */
 public function index()
 {
     $contents = Content::latest('published_at')->published()->get();
     return view('home', compact('contents'));
 }
예제 #3
0
 /**
  * Show all content.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $content = Content::latest('published_at')->published()->get();
     return view('home', compact('content'));
     //        return response()->json($content);
 }
예제 #4
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $posts = Content::latest('created_at')->get();
     return view('admin.posts.index', compact('posts'));
 }