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


PHP Client::orderBy方法代码示例

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


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

示例1: clientsByName

 static function clientsByName()
 {
     $clients = Client::orderBy('name')->get(['id', 'name'])->getDictionary();
     return array_map(function ($client) {
         return $client->name;
     }, $clients);
 }
开发者ID:sethphillips,项目名称:event_mailer,代码行数:7,代码来源:User.php

示例2: index

 public function index()
 {
     $clients = Client::orderBy('name', 'ASC')->get();
     $debtors = Debtor::orderBy('name', 'ASC')->get();
     $relations = Relation::all();
     $tariffs = Tariff::all();
     return view('relations.index', ['relations' => $relations, 'clients' => $clients, 'tariffs' => $tariffs, 'debtors' => $debtors]);
 }
开发者ID:PixelPartyRu,项目名称:erp,代码行数:8,代码来源:RelationController.php

示例3: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $service = Service::findOrFail($id);
     $currencies = ['hrk' => 'HRK', 'usd' => 'USD', 'eur' => 'EUR'];
     $clients = Client::orderBy('name')->pluck('name', 'id')->toArray();
     $categories = Category::orderBy('name')->pluck('name', 'id')->toArray();
     return view('services.edit')->with(compact('service', 'currencies', 'clients', 'categories'));
 }
开发者ID:laravelista,项目名称:kyle,代码行数:14,代码来源:ServiceController.php

示例4: index

 public function index()
 {
     $deliveries = Delivery::all();
     $clients = Client::orderBy('name', 'ASC')->get();
     $debtors = Debtor::orderBy('name', 'ASC')->get();
     $dateToday = Carbon::now()->format('Y-m-d');
     $registries = Delivery::orderBy('registry')->lists('registry', 'registry')->toArray();
     return view('delivery.index', ['registries' => $registries, 'deliveries' => $deliveries, 'clients' => $clients, 'debtors' => $debtors, 'dateToday' => $dateToday]);
 }
开发者ID:PixelPartyRu,项目名称:erp,代码行数:9,代码来源:DeliveryController.php

示例5: index

 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function index()
 {
     $expensesss = Expense::where('project_id', '=', 0)->first();
     $expensess = Expense::where('project_id', '=', 0)->orderBy('paid_on', 'desc')->get();
     $clients = Client::orderBy('created_at', 'desc')->get();
     $projects = Project::orderBy('created_at', 'desc')->get();
     $expenses = Expense::where('project_id', '>', 0)->orderBy('paid_on', 'desc')->get();
     $payments = Payment::orderBy('created_at', 'desc')->get();
     $hours = Hour::where('amount_paid', '<', 0)->orderBy('day_worked', 'desc')->get();
     return view('home', compact('projects', 'expenses', 'payments', 'hours', 'clients', 'expensess', 'expensesss'));
 }
开发者ID:patrykszady,项目名称:gstest,代码行数:16,代码来源:HomeController.php

示例6: getUpdate

 public function getUpdate($ticketId)
 {
     $ticket = \App\Ticket::find($ticketId);
     $formOptions = [];
     $clients = \App\Client::orderBy('name', 'ASC')->get();
     $formOptions['client'] = \App\Helpers\FormHelper::objectsToKeyValueArray($clients, 'id', 'name');
     $formOptions['client'] = ['' => '--Not Assigned To Client--'] + $formOptions['client'];
     $statuses = \App\Status::orderBy('weight', 'ASC')->get();
     $formOptions['statuses'] = \App\Helpers\FormHelper::objectsToKeyValueArray($statuses, 'id', 'name');
     $formOptions['priorities'] = array_combine(range(1, 10), range(1, 10));
     $users = \App\User::all();
     $formOptions['users'] = \App\Helpers\FormHelper::objectsToKeyValueArray($users, 'id', 'email');
     return view('ticket.edit', ['ticket' => $ticket, 'formOptions' => $formOptions]);
 }
开发者ID:kilrizzy,项目名称:laraticket,代码行数:14,代码来源:TicketController.php

示例7: report

 /**
  * Show the report for all things.
  *
  * @return [type]
  */
 public function report()
 {
     $services = Service::orderBy('month')->orderBy('day')->where('active', 1)->with(['client', 'category'])->get();
     $clients = Client::orderBy('name')->whereHas('services', function ($query) {
         $query->where('active', 1);
     })->with(['services' => function ($query) {
         $query->where('active', 1);
     }])->get();
     $categories = Category::orderBy('name')->whereHas('services', function ($query) {
         $query->where('active', 1);
     })->with(['services' => function ($query) {
         $query->where('active', 1);
     }])->get();
     return view('report')->with(compact('services', 'clients', 'categories'));
 }
开发者ID:laravelista,项目名称:kyle,代码行数:20,代码来源:HomeController.php

示例8: mealRosterDinner

 public function mealRosterDinner()
 {
     $meals = Meal::orderBy('date_fed', 'desc')->first();
     $clients = Client::orderBy('lname', 'asc')->get();
     if ($meals->date_fed != date('Y-m-d')) {
         foreach ($clients as $client) {
             $meals = new Meal();
             $meals->date_fed = date('Y-m-d');
             $meals->client()->associate($client);
             $meals->breakfast = 0;
             $meals->lunch = 0;
             $meals->dinner = 0;
             $meals->save();
         }
     }
     return view('meal.meal_roster_dinner', compact('clients'));
 }
开发者ID:ecortez3,项目名称:CCO,代码行数:17,代码来源:MealController.php

示例9: store

 public function store()
 {
     $rules = array('name' => 'required', 'country' => 'required', 'state' => 'required', 'city' => 'required', 'zip' => 'required', 'address' => 'required', 'contact' => 'required', 'phone' => 'required', 'email' => 'required|email', 'website' => 'url');
     $validator = Validator::make(Request::all(), $rules);
     if ($validator->passes()) {
         $store = new Client();
         $store->fill(Request::all());
         $store->save();
         // Reload Table Data
         $data_client = array('client' => Client::orderBy('id', 'desc')->get(), 'refresh' => true);
         return view('clients.table')->with($data_client);
     } else {
         if (Request::ajax()) {
             return view('clients.create')->withErrors($validator)->withInput(Request::all());
         }
         return 0;
     }
 }
开发者ID:sharudee,项目名称:cos-ajax,代码行数:18,代码来源:ClientController.php

示例10: allAppointment

 function allAppointment()
 {
     if (isset($_SESSION['authorization'])) {
         if ($_SESSION['authorization'] == 1) {
             $clients = Client::orderBy('id', 'DESC')->get();
         } else {
             $clients = Client::where('doctor_id', $_SESSION['user_id'])->orderBy('id', 'DESC')->get();
         }
         return view('clients.allAppointment', ['clients' => $clients]);
     } else {
         //$_SESSION['mesaj'] = '<div class="form-signin" style="background-color:pink;"><center><p style="color:red;">Bu Sayfaya Girme Yetkiniz Yok .</p></center></div>';
         return Redirect::to('./sayfa-bulunamadi');
     }
 }
开发者ID:ufukpalavar52,项目名称:laravel-php-projelerim,代码行数:14,代码来源:ClientsController.php

示例11: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return view('client.index', ['clients' => Client::orderBy('name')->get()]);
 }
开发者ID:Rhenan,项目名称:tasks,代码行数:9,代码来源:ClientController.php

示例12: mealsTotal

 /**
  * @param $stdate
  * @param $edate
  * @return array
  */
 public function mealsTotal($stdate, $edate)
 {
     $clients = Client::orderBy('lname', 'asc')->get();
     $mealTotal = array();
     for ($i = 1; $i <= 31; $i++) {
         $dayTotal[$i] = 0;
     }
     foreach ($clients as $client) {
         $id = $client->id;
         $mealTotal[$id] = 0;
         $rowMeals[$id] = $client->meal()->where('date_fed', '>=', $stdate)->where('date_fed', '<', $edate)->get()->toArray();
         foreach ($rowMeals[$id] as $row) {
             $b = $row['breakfast'];
             $l = $row['lunch'];
             $d = $row['dinner'];
             $mealTotal[$id] += $b + $l + $d;
         }
     }
     return $mealTotal;
 }
开发者ID:ecortez3,项目名称:CCO,代码行数:25,代码来源:ReportController.php

示例13: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $client = Client::orderBy('updated_at', 'desc')->paginate(50);
     return view('admin.client.index', compact('client'));
 }
开发者ID:thibaultvanc,项目名称:organit,代码行数:10,代码来源:ClientController.php

示例14: __construct

 public function __construct()
 {
     $clients = Client::orderBy('name')->lists('name', 'id');
     view()->share(['clients' => $clients]);
 }
开发者ID:sethphillips,项目名称:event_mailer,代码行数:5,代码来源:CampaignController.php

示例15: getIndex

 public function getIndex()
 {
     $clients = \App\Client::orderBy('name', 'ASC')->get();
     return view('client.index', ['clients' => $clients]);
 }
开发者ID:kilrizzy,项目名称:laraticket,代码行数:5,代码来源:ClientController.php


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