本文整理匯總了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);
}