本文整理汇总了PHP中app\Event::getPublicEvents方法的典型用法代码示例。如果您正苦于以下问题:PHP Event::getPublicEvents方法的具体用法?PHP Event::getPublicEvents怎么用?PHP Event::getPublicEvents使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Event
的用法示例。
在下文中一共展示了Event::getPublicEvents方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index($local_events_only = false)
{
$user = Auth::user();
$events = $this->getUsersEvents();
$invites = $this->getUserInvitedEvents();
$public_events = Event::getPublicEvents();
$this->updateCity();
return view('home')->with('events', $events)->with('invites', $invites)->with('public_events', $public_events)->with('local_events_only', $local_events_only)->with('city', $user->city);
}
示例2: index
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$public_events = Event::getPublicEvents();
return response()->json(compact('public_events'));
/*return view('welcome')->with('public_events', $public_events);
$events = $this->getUsersEvents();
$invites = $this->getUserInvitedEvents();
$array = array_merge($events->toArray(), $invites);
return response()->json(compact('array'));*/
}
示例3: getPublicEvents
public function getPublicEvents()
{
$events = Event::getPublicEvents();
return $events;
}
示例4: index
/**
* Show the applications welcome page
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$public_events = Event::getPublicEvents();
return view('welcome')->with('public_events', $public_events);
}