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


PHP Pages::all方法代码示例

本文整理汇总了PHP中Pages::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Pages::all方法的具体用法?PHP Pages::all怎么用?PHP Pages::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pages的用法示例。


在下文中一共展示了Pages::all方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: postOrder

 public function postOrder()
 {
     $pages = Pages::all();
     foreach ($pages as $page) {
         $page->order = count($pages) - 1;
         $page->save();
     }
     foreach (Input::get('data') as $item) {
         $this->setOrderPosition($item);
     }
     return Response::json(Input::get('data'));
 }
开发者ID:nagyist,项目名称:abge,代码行数:12,代码来源:PageController.php

示例2: str_replace

    /* $fileContents= file_get_contents($page_values->page_url);
       $fileContents = str_replace(array("\n", "\r", "\t"), '', $fileContents);
       $fileContents = trim(str_replace('"', "'", $fileContents));
       $simpleXml = simplexml_load_string($fileContents);
       $json = json_encode($simpleXml);
       $values=json_decode($json,true);*/
    //  return $section_values;
    //return Pages::all();
    // return $values['form']['field'][0]['@attributes']['group'];
    //  return $page_values->page_url;
    return View::make('editSection')->with(['section_values' => $section_values]);
});
Route::get('/delete', function () {
    $page_values = Pages::where('id', '=', Input::get('id'))->first();
    DB::table('pages')->where('id', '=', Input::get('id'))->delete();
    $pages = Pages::all();
    if (File::exists($page_values->page_url)) {
        File::delete($page_values->page_url);
    }
    return View::make('table')->with(['message' => "Page deleted successfully", 'pages' => $pages]);
});
Route::get('/deleteSection', function () {
    $page_values = Sections::where('id', '=', Input::get('id'))->first();
    DB::table('sections')->where('id', '=', Input::get('id'))->delete();
    $sections = Sections::all();
    if (File::exists($page_values->section_url)) {
        File::deleteDirectory($page_values->section_url);
    }
    return View::make('upload')->with(['message' => "Section deleted successfully", 'sections' => $sections]);
});
Route::get('/section', function () {
开发者ID:GrameenGhana,项目名称:cch-pointofcarecms-webapp,代码行数:31,代码来源:routes.php

示例3: array

    return array('laracms/extends/backend/widgets');
}, 1);
Event::listen('backend.sidebar.create', function () {
    return array('laracms/extends/backend/sidebarmenu');
}, 1);
Event::listen('backend.navbar.create', function () {
    return array('laracms/extends/backend/tools');
}, 1);
Event::listen('backend.footer.create', function () {
    return array('laracms/extends/backend/footer');
}, 1);
Event::listen('backend.header.create', function () {
    return array('laracms/extends/backend/header');
}, 1);
Event::listen('laracms.pages.all', function ($params) {
    return Pages::all();
}, 1);
Event::listen('laracms.main.content', function ($params) {
    return Config::get('cms.controller.content');
}, 1);
Event::listen('laracms.pages.last', function ($params) {
    return Pages::orderby('created_at', 'desc')->first();
}, 1);
Event::listen('laracms.menus.specific', function ($params) {
    $specific = Cache::remember('laracms_specific_menu_' . $params['menuid'], 60, function () use($params) {
        $menu = Menus::find($params['menuid']);
        $it = $menu->menuitems;
        $items = array();
        $content = Event::fire('laracms.collect.content.types');
        foreach ($it as $k => $ti) {
            $items[$k] = $ti;
开发者ID:basdog22,项目名称:laracms,代码行数:31,代码来源:func.php


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