本文整理汇总了PHP中app\models\Page::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::all方法的具体用法?PHP Page::all怎么用?PHP Page::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Page
的用法示例。
在下文中一共展示了Page::all方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$pages = Page::all();
$data = ['route' => 'pages', 'title' => Page::$tableName, 'pages' => $pages, 'pagesFields' => Page::$fields];
return view('admin.pages.pageList', $data);
}
示例2: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
return view('admin.pages.index')->withPages(Page::all());
}
示例3:
<!-- PAGE OR LINK field -->
<!-- Used in Dick\MenuItemManager -->
<?php
$field['options'] = ['page_link' => 'Page link', 'internal_link' => 'Internal link', 'external_link' => 'External link'];
$field['allows_null'] = false;
$active_pages = \App\Models\Page::all();
?>
<div class="form-group">
<label>{{ $field['label'] }}</label>
<div class="clearfix"></div>
<div class="col-sm-3">
<select
class="form-control"
name="type"
id="page_or_link_select"
@foreach ($field as $attribute => $value)
@if (!is_array($value))
{{ $attribute }}="{{ $value }}"
@endif
@endforeach
>
@if (isset($field['allows_null']) && $field['allows_null']==true)
<option value="">-</option>
@endif
@if (count($field['options']))
示例4: index
public function index()
{
return \View::make('admin.pages.index')->with('pages', Page::all());
}
示例5: manage
//.........这里部分代码省略.........
//update drag and drop menu and navbar
var updateOutput = function(e)
{
var list = e.length ? e : $(e.target), output = list.data('output');
var items = list.nestable('serialize');
jsonobject = window.JSON.stringify(items);
$.ajax({
url: '/admin/menus/<?php
echo $id;
?>
/manage',
type: 'POST',
data: { content: jsonobject}
});
//clear navbar
$('.menubar').html('');
//rebuild navbar
$.each(JSON.parse(jsonobject), function (index, item) {
$('.menubar').append(buildNav(item));
});
};
// activate Nestable for list 1
$('#nestable').nestable({group: 1}).on('change', updateOutput);
// output initial serialised data
updateOutput($('#nestable'));
$('#nestable-menu').on('click', function(e){
var action = $(e.target).data('action');
if (action === 'expand-all') {
$('.dd').nestable('expandAll');
}
if (action === 'collapse-all') {
$('.dd').nestable('collapseAll');
$('.dd3content:visible').slideUp();
}
if (action === 'delete') {
$('.outer').html('');
updateOutput($('#nestable'));
}
});
//add row
$('#addrow').submit(function() {
var title = $('#title').val();
var slug = $('#slug').val();
id = $.now();
if(title !='' && slug !=''){
$('ol.outer').append('<li class="dd-item dd3-item" data-title="'+title+'" data-slug="'+slug+'" data-id="'+id+'"><div class="dd-handle dd3-handle"><i class="fa fa-server"></i></div><div class="dd3-content" name="'+id+'">'+title+'<span class="pull-right">Custom Link</span></div><div id="c-'+id+'" class="dd3content"><a href="#" class="remove">remove</a></div></li>');
updateOutput($('#nestable'));
}
//clear form
$('#addrow').trigger('reset');
return false;
});
$('#selectpages').click(function(event) { //on click
if(this.checked) { // check select status
$('.checkbox1').each(function() { //loop through each checkbox
this.checked = true; //select all checkboxes with class "checkbox"
});
}else{
示例6: getIndex
/**
* Display a listing of the resource.
*
* @return Response
*/
public function getIndex()
{
$paginationlimit = $this->paginationlimit;
$pages = Page::all();
return view('admin.page.index', ['pages' => $pages]);
}
示例7: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$pages = Page::all();
dd($pages);
}
示例8: index
public function index(Request $request)
{
$pages = Page::all();
$tplData = ['pages' => $pages];
return view('admin::pages.list', $tplData);
}