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


PHP Page::paginate方法代码示例

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


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

示例1: index

 public function index()
 {
     $pages = Page::paginate(15);
     return view('dashboard.page.index', compact('pages'));
 }
开发者ID:nutsdo,项目名称:nong-store,代码行数:5,代码来源:PageController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $list = Page::paginate(10);
     return view('page.list', compact('list', $list));
 }
开发者ID:NikoNick,项目名称:EventsBerry,代码行数:10,代码来源:PageController.php

示例3: index

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  *
  * @return Response
  */
 public function index()
 {
     $page = Page::paginate(15);
     return view('blog.index', compact('page'));
 }
开发者ID:AleksandrKovalev,项目名称:laravel_blog,代码行数:12,代码来源:BlogController.php

示例4: page

 /**
  * 单页内容列表
  */
 public function page()
 {
     $data = Page::paginate(15);
     return view('backend.article.page', ['data' => $data]);
 }
开发者ID:qhorse,项目名称:casencms,代码行数:8,代码来源:ArticleController.php

示例5: index

 /**
  * Display a listing of the resource.
  * @return Response
  */
 public function index()
 {
     $pages = Page::paginate(15);
     $this->checkPagination($pages);
     return View::make('pages.index')->with('pages', $pages);
 }
开发者ID:backstagetechnicalservices,项目名称:website,代码行数:10,代码来源:PagesController.php

示例6: pages

 public function pages()
 {
     $pages = Page::paginate(15);
     return view('admin.pages', compact('pages'));
 }
开发者ID:omasterdesign,项目名称:omasterdefault,代码行数:5,代码来源:AdminController.php

示例7: index

 function index(Request $request)
 {
     $userdetails = $this->forUser($request->user());
     if ($userdetails) {
         foreach ($userdetails as $val) {
             $description = isset($val->description) ? $val->description : '';
             $image_name = isset($val->image_name) ? $val->image_name : '';
             $user_id = isset($val->user_id) ? $val->user_id : '';
         }
     }
     $user_reg_detail = User::where('id', $request->user()->id)->get();
     foreach ($user_reg_detail as $val) {
         $username = isset($val->name) ? $val->name : '';
         $useremail = isset($val->email) ? $val->email : '';
         $userpassword = $val->password;
     }
     $userdetail = ['description' => isset($description) ? $description : '', 'name' => $username, 'email' => $useremail, 'image_name' => $image_name != '' ? $image_name : ''];
     if ($request->isMethod('post')) {
         $inputData = ['description' => $request->description];
         if ($request->hasFile('profileimage')) {
             $image = $request->file('profileimage');
             if ($image->getClientOriginalExtension()) {
                 $original_filename = 'original' . time() . '.' . $image->getClientOriginalExtension();
                 $small_filename = '40_' . time() . '.png';
                 $medium_filename = '100_' . time() . '.png';
                 $big_filename = '800_' . time() . '.png';
                 //                 $path_original =  public_path('images/'.$original_filename);
                 //                 $path_small    =  public_path('images/'.$small_filename);
                 //                 $path_medium   =  public_path('images/'.$medium_filename);
                 //                 $path_big      =  public_path('images/'.$big_filename);
                 //Upload image to dir with the help of serviceProvider.
                 $uploadPath = 'images/';
                 $desire_upload_path = $this->filePathaObj->create_directory_image_upload($uploadPath);
                 $path_original_dir = $desire_upload_path . $original_filename;
                 $path_small_dir = $desire_upload_path . $small_filename;
                 $path_medium_dir = $desire_upload_path . $medium_filename;
                 $path_big_dir = $desire_upload_path . $big_filename;
                 Image::make($image)->save($path_original_dir);
                 Image::make($image)->fit(40)->sharpen(15)->save($path_small_dir);
                 Image::make($image)->fit(100)->save($path_medium_dir);
                 Image::make($image)->fit(800, 600, function ($constraint) {
                     $constraint->upsize();
                 })->save($path_big_dir);
             } else {
                 exit('Format not supported');
             }
             $inputData['image_name'] = $path_medium_dir;
         }
         $userData = ['name' => $request->name, 'email' => $request->email];
         if (isset($request->password) && $request->password != '' && $userpassword != bcrypt($request->password)) {
             $userData['password'] = bcrypt($request->password);
         }
         if (!$user_id) {
             $request->user()->editprofiles()->create($inputData);
             //order_detail()
             ////orderDetail()
             //               $edit = new Editprofile();
             //               $edit->description = $request->description;
             //               $edit->user_id     = $request->user()->id;
             //               $edit->save();
         } else {
             Editprofile::where('user_id', $request->user()->id)->update($inputData);
             //For Authorization Testing
             //                $editprofileobj = new Editprofile();
             //                $this->authorize('update_editprofile', $editprofileobj );
             //                $t =  Auth::user()->can('update_editprofile',$editprofileobj);
             //                dd($t);
             //                $this->update_editprofile(Request $request);
             //Don't delete it Event fired when update detail of user.
             //Event::fire(new SomeEvent());
             User::where('id', $request->user()->id)->update($userData);
             return redirect()->back()->withInput();
         }
     } else {
         $pagedetail = Page::paginate(5);
         $priceLib = new PriceLibrary();
         $prices = $priceLib->getPrices();
         //               $value = $request->session()->get('client_session_array');
         //               $user_type = $value['user_type'];
         //               dd($user_type);
         return view('user/editprofile', ['userdetail' => $userdetail, 'pagedetail' => $pagedetail, 'prices' => $prices]);
     }
 }
开发者ID:umeshcalipus,项目名称:umesh-laravel-project,代码行数:83,代码来源:EditProfileController.php

示例8: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return view('page.index', ['pages' => Page::paginate(10)]);
 }
开发者ID:nasikgiga,项目名称:onlineshop,代码行数:9,代码来源:PageController.php


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