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


PHP Company::paginate方法代码示例

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


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

示例1: index

 public function index()
 {
     $companies = Company::paginate($this->pageElements);
     return view('site.index', ['companies' => $companies]);
 }
开发者ID:rtorralba,项目名称:companies,代码行数:5,代码来源:MainController.php

示例2: activate

 public function activate($id)
 {
     $company = Company::findOrFail($id);
     $company->status = 'ACTIVE';
     $company->save();
     $date = new \DateTime();
     DB::table('users')->where('company_id', $id)->update(array('status' => 'ACTIVE', 'active_date' => $date));
     \Session::flash('message', 'You have successfully activated ' . $company->name);
     $keyword = '';
     $companies = Company::paginate(15);
     return view('company.list', compact('companies', 'keyword'));
 }
开发者ID:keiwerkgvr,项目名称:salesperformanceindicator,代码行数:12,代码来源:TrainingController.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $company = Company::paginate();
     return view('settings.companys.index', compact('company'));
 }
开发者ID:raulbravo23,项目名称:salepoint,代码行数:10,代码来源:CompanysController.php

示例4: delete

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function delete($id)
 {
     $company = Company::findOrFail($id);
     //goals
     DB::table('goal_managements')->whereIn('user_id', function ($query) use($company) {
         $query->select('id')->from('users')->whereRaw('users.company_id = ?', array($company->id));
     })->delete();
     //points
     DB::table('points')->where('company_id', '=', $company->id)->delete();
     //points_audit
     DB::table('point_audits')->where('company_id', '=', $company->id)->delete();
     //sales
     DB::table('sales')->where('company_id', '=', $company->id)->delete();
     //sales_audits
     DB::table('sale_audits')->where('company_id', '=', $company->id)->delete();
     //user_passwords
     DB::table('user_passwords')->whereIn('user_id', function ($query) use($company) {
         $query->select('id')->from('users')->whereRaw('users.company_id = ?', array($company->id));
     })->delete();
     //users
     DB::table('users')->where('company_id', '=', $company->id)->delete();
     //company
     DB::table('companies')->where('id', '=', $company->id)->delete();
     \Session::flash('message', 'You have successfully delete ' . $company->name);
     $keyword = '';
     $companies = Company::paginate(15);
     return view('company.list', compact('companies', 'keyword'));
 }
开发者ID:villar88,项目名称:salesperformanceindicator,代码行数:34,代码来源:CompanyController.php

示例5: index

 public function index()
 {
     return view('company.index', ['companies' => \App\Company::paginate(10)]);
 }
开发者ID:faridfadhlan,项目名称:simdapel,代码行数:4,代码来源:CompanyController.php

示例6: getAll

 /**
  * Get all of the companies
  *
  * @return Collection
  */
 public function getAll()
 {
     return Company::paginate(15);
 }
开发者ID:figura4,项目名称:c64,代码行数:9,代码来源:CompanyRepository.php


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