コード例 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $allLocations = Marker_location::all();
     $allEvents = Events::orderBy('created_at', 'DESC')->get();
     $allPost = Posts::orderBy('created_at', 'DESC')->get();
     //getting all the post from post database table
     $allUserPhotos = PhotoMapImageUploader::orderBy('photoMapId')->get();
     return view('admin.index', compact('allLocations', 'allEvents', 'allPost', 'allUserPhotos'));
 }
コード例 #2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $allUserPosts = Posts::where('user_id', \Auth::user()->id)->orderBy('created_at', 'DESC')->get();
     // $UAI = UserAdditionalInfo::findOrFail($UAI_id);
     // $userInfo = UserAdditionalInfo::where('user_id', \Auth::user()->id)->first();
     $userInfo = \Auth::user();
     $allEvents = Events::orderBy('created_at', 'DESC')->take(2)->get();
     $allUserPhotos = PhotoMapImageUploader::where('userId', \Auth::user()->id)->orderBy('photoMapId', 'DESC')->take(6)->get();
     return view('profilePage.index', compact('allUserPosts', 'userInfo', 'allEvents', 'allUserPhotos'));
 }
コード例 #3
0
 public function getIndex()
 {
     if (!ACL::hasPermission('visitWellPhotos')) {
         return redirect(route('home'))->withErrors(['Você não pode acessar a página Eventos.']);
     }
     $events = Events::orderBy('date', 'DESC')->get();
     foreach ($events as $event) {
         array_set($event, 'date', Carbon::createFromFormat('Y-m-d', $event->date)->format('d/m/Y'));
     }
     return view('admin.events.index')->with(compact('events'));
 }
コード例 #4
0
 public function index(Request $request)
 {
     $page = 'eventos';
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     $pages = Pages::where('slug', '=', $page)->first();
     $type = 0;
     if (!empty($request->type) and $request->type == "internacionais") {
         $type = 1;
     }
     $events = Events::orderBy('date', 'desc')->where('type', '=', $type)->paginate(5);
     return view('website.events.index')->with(compact('page', 'pages', 'websiteSettings', 'request', 'events'));
 }
コード例 #5
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $allPost = Posts::orderBy('created_at', 'DESC')->get();
     //getting all the post from post database table
     $userInfo = \Auth::user();
     $allEvents = Events::orderBy('created_at', 'DESC')->take(2)->get();
     $allUserPhotos = PhotoMapImageUploader::orderBy('photoMapId', 'DESC')->take(6)->get();
     // $postId = $allPost->id;
     // $TotalComments = Comments::where('on_post', '5')->count();
     // dd($TotalComments);
     return view('home.index', compact('allPost', 'userInfo', 'allEvents', 'allUserPhotos'));
 }
コード例 #6
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $allEvents = Events::orderBy('created_at', 'DESC')->get();
     return view('events.index', compact('allEvents'));
 }
コード例 #7
0
ファイル: EventController.php プロジェクト: riskteria/wempos
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $events = Events::orderBy('due_date', 'asc')->get();
     $data = array('events' => $events);
     return view('pages.event', $data);
 }