當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。