当前位置: 首页>>代码示例>>PHP>>正文


PHP Page::all方法代码示例

本文整理汇总了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);
 }
开发者ID:pechatny,项目名称:kolizej,代码行数:11,代码来源:PagesController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return view('admin.pages.index')->withPages(Page::all());
 }
开发者ID:Zachary-Leung,项目名称:wine_platform,代码行数:9,代码来源:PagesController.php

示例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']))
开发者ID:RSivakov,项目名称:crud,代码行数:31,代码来源:page_or_link.blade.php

示例4: index

 public function index()
 {
     return \View::make('admin.pages.index')->with('pages', Page::all());
 }
开发者ID:daniellimafreire,项目名称:l4-site-tutorial,代码行数:4,代码来源:PagesController.php

示例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{
开发者ID:nova-framework,项目名称:cms,代码行数:67,代码来源:Menus.php

示例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]);
 }
开发者ID:udayc,项目名称:travel,代码行数:11,代码来源:PageController.php

示例7: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $pages = Page::all();
     dd($pages);
 }
开发者ID:sdlyhu,项目名称:laravel5-backend,代码行数:10,代码来源:PagesController.php

示例8: index

 public function index(Request $request)
 {
     $pages = Page::all();
     $tplData = ['pages' => $pages];
     return view('admin::pages.list', $tplData);
 }
开发者ID:unstoppablecarl,项目名称:laravel-content-pages-example,代码行数:6,代码来源:Pages.php


注:本文中的app\models\Page::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。