本文整理汇总了PHP中Activity::with方法的典型用法代码示例。如果您正苦于以下问题:PHP Activity::with方法的具体用法?PHP Activity::with怎么用?PHP Activity::with使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Activity
的用法示例。
在下文中一共展示了Activity::with方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionActivity
public function actionActivity()
{
$model = new Activity('search');
$model->with('users');
$model->unsetAttributes();
if (isset($_GET['Activity'])) {
$model->attributes = $_GET['Activity'];
}
$this->render('activity', array('model' => $model));
}
示例2: edit
public function edit($id)
{
$activity = Activity::with('points')->find($id);
$menu = 'academic';
return View::make('points.edit', compact('activity', 'menu'));
}
示例3: logs
/**
* Show the form for creating a new resource.
* GET /activities/create
*
* @return Response
*/
public function logs()
{
//$cpage = 'activity';
$logs = Activity::with('actor')->get();
return $logs;
}
示例4: index
public function index()
{
$activities = Activity::with('participations')->where('project_id', '=', Auth::user()->curr_project_id)->where('location_id', '=', Auth::user()->location_id)->get();
$menu = 'academic';
return View::make('participations.index', compact('activities', 'menu'));
}