本文整理汇总了PHP中app\Page::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::get方法的具体用法?PHP Page::get怎么用?PHP Page::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Page
的用法示例。
在下文中一共展示了Page::get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
//return jsonp
/* $callback = input::get('callback');
return $callback."(".json_encode(Page::get()).")";*/
return Response::json(Page::get());
}
示例2: index
public function index(Page $page)
{
if (!Entrust::can('manage_page')) {
return redirect('/dashboard')->withErrors(config('constants.NA'));
}
$pages = $page->get();
$col_data = array();
$col_heads = array(trans('messages.Option'), trans('messages.Title'), trans('messages.Published'), trans('messages.Sign-in Only'));
$col_heads = Helper::putCustomHeads($this->form, $col_heads);
$col_ids = Helper::getCustomColId($this->form);
$values = Helper::fetchCustomValues($this->form);
foreach ($pages as $page) {
$cols = array('<div class="btn-group btn-group-xs">' . '<a href="page/' . $page->id . '/edit" class="btn btn-default btn-xs" data-toggle="tooltip" title="Edit"> <i class="fa fa-edit"></i></a> ' . delete_form(['page.destroy', $page->id]) . '</div>', $page->page_title, $page->published ? '<span class="badge badge-success">Publised</span>' : '<span class="badge badge-danger">Hold</span>', $page->sign_in_only ? '<span class="badge badge-warning">Sign-in Only</span>' : '<span class="badge badge-info">All</span>');
$id = $page->id;
foreach ($col_ids as $col_id) {
array_push($cols, isset($values[$id][$col_id]) ? $values[$id][$col_id] : '');
}
$col_data[] = $cols;
}
Helper::writeResult($col_data);
return view('page.index', compact('col_heads'));
}
示例3: index
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$page = Page::get();
return view('pages.index', compact('page'));
}
示例4: index
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$data = ['pages' => Page::get()];
return response()->view('pages.index', $data);
}