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


PHP Client::all方法代码示例

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


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

示例1: edit

 /**
  * Show the form for editing the specified booking.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $booking = Booking::find($id);
     $clients = Client::all();
     $cars = Car::all();
     return View::make('bookings.edit', compact('booking', 'cars', 'clients'));
 }
开发者ID:kenkode,项目名称:umash-1,代码行数:13,代码来源:BookingsController.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     /* This checks the client list for the CID. If a matching CID is found, all caching will be ignored
        for this request */
     if (Cache::has('clients')) {
         $clients = Cache::get('clients');
     } else {
         $clients = Client::all();
         Cache::put('clients', $clients, 1);
     }
     if (Cache::has('keys')) {
         $keys = Cache::get('keys');
     } else {
         $keys = Key::all();
         Cache::put('keys', $keys, 1);
     }
     $input_cid = Input::get('cid');
     if (!empty($input_cid)) {
         foreach ($clients as $client) {
             if ($client->uuid == $input_cid) {
                 $this->client = $client;
             }
         }
     }
     $input_key = Input::get('k');
     if (!empty($input_key)) {
         foreach ($keys as $key) {
             if ($key->api_key == $input_key) {
                 $this->key = $key;
             }
         }
     }
 }
开发者ID:NorthPL,项目名称:Solder-for-NorthLauncher,代码行数:34,代码来源:ApiController.php

示例3: edit

 /**
  * Show the form for editing the specified order.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $items = Item::all();
     $customers = Client::all();
     $order = Order::findOrFail($id);
     return View::make('orders.edit', compact('items', 'customers', 'order'));
 }
开发者ID:kenkode,项目名称:gasexpress,代码行数:13,代码来源:OrdersController.php

示例4: clients

 public function clients()
 {
     $clients = Client::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('erpreports.clientsReport', compact('clients', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Client List.pdf');
 }
开发者ID:kenkode,项目名称:umash-1,代码行数:7,代码来源:ErpReportsController.php

示例5: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $project = Project::find($id);
     $services = Service::all();
     $clients = Client::all();
     return View::make('projects.edit')->withProject($project)->withService($services)->withClients($clients);
     /*return $clients;*/
 }
开发者ID:BobbyHoltzner,项目名称:Laravel4CRM,代码行数:14,代码来源:ProjectsController.php

示例6: __construct

 function __construct()
 {
     parent::__construct();
     $this->view_data['core_settings'] = Setting::first();
     if ($this->input->cookie('language') != "") {
         $language = $this->input->cookie('language');
     } else {
         if (isset($this->view_data['language'])) {
             $language = $this->view_data['language'];
         } else {
             if (!empty($this->view_data['core_settings']->language)) {
                 $language = $this->view_data['core_settings']->language;
             } else {
                 $language = "english";
             }
         }
     }
     $this->lang->load('application', $language);
     $this->lang->load('messages', $language);
     $this->lang->load('event', $language);
     $this->user = $this->session->userdata('user_id') ? User::find_by_id($this->session->userdata('user_id')) : FALSE;
     $this->client = $this->session->userdata('client_id') ? Client::find_by_id($this->session->userdata('client_id')) : FALSE;
     if ($this->client) {
         $this->theme_view = 'application_client';
     }
     $this->view_data['datetime'] = date('Y-m-d H:i', time());
     $this->view_data['sticky'] = Project::all(array('conditions' => 'sticky = 1'));
     $this->view_data['quotations_new'] = Quote::find_by_sql("select count(id) as amount from quotations where status='New'");
     if ($this->user || $this->client) {
         $access = $this->user ? $this->user->access : $this->client->access;
         $access = explode(",", $access);
         if ($this->user) {
             $this->view_data['menu'] = Module::find('all', array('order' => 'sort asc', 'conditions' => array('id in (?) AND type = ?', $access, 'main')));
             $this->view_data['widgets'] = Module::find('all', array('conditions' => array('id in (?) AND type = ?', $access, 'widget')));
         } else {
             $this->view_data['menu'] = Module::find('all', array('order' => 'sort asc', 'conditions' => array('id in (?) AND type = ?', $access, 'client')));
         }
         if ($this->user) {
             $update = User::find($this->user->id);
         } else {
             $update = Client::find($this->client->id);
         }
         $update->last_active = time();
         $update->save();
         if ($this->user) {
             $this->view_data['user_online'] = User::all(array('conditions' => array('last_active+(30 * 60) > ? AND status = ?', time(), "active")));
             $this->view_data['client_online'] = Client::all(array('conditions' => array('last_active+(30 * 60) > ? AND inactive = ?', time(), "0")));
         }
         $email = $this->user ? 'u' . $this->user->id : 'c' . $this->client->id;
         $this->view_data['messages_new'] = Privatemessage::find_by_sql("select count(id) as amount from privatemessages where `status`='New' AND recipient = '" . $email . "'");
         $this->view_data['tickets_new'] = Ticket::find_by_sql("select count(id) as amount from tickets where `status`='New'");
     }
     /*$this->load->database();
     		$sql = "select * FROM templates WHERE type='notes'";
     		$query = $this->db->query($sql); */
     $this->view_data["note_templates"] = "";
     //$query->result();
 }
开发者ID:pratikbgit,项目名称:freelancerKit,代码行数:58,代码来源:MY_Controller.php

示例7: clientList

 public function clientList($id = null)
 {
     if ($id == null) {
         $clients = Client::all(array('id', 'name'));
     } else {
         $clients = Client::where('id_user', '=', Auth::user()->id)->get(array('id', 'name'));
     }
     $clientsRow = array();
     $clientsRow[0] = "Cliente";
     foreach ($clients as $client) {
         $clientsRow[$client["id"]] = $client["name"];
     }
     return $clientsRow;
 }
开发者ID:josemujicap,项目名称:AveFenix-CRM,代码行数:14,代码来源:Contact.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     /* This checks the client list for the CID. If a matching CID is found, all caching will be ignored
        for this request */
     if (Cache::has('clients')) {
         $clients = Cache::get('clients');
     } else {
         $clients = Client::all();
         Cache::put('clients', $clients, 1);
     }
     foreach ($clients as $client) {
         if ($client->uuid == Input::get('cid')) {
             $this->client = $client;
         }
     }
 }
开发者ID:kreezxil,项目名称:TechnicSolder,代码行数:17,代码来源:api.php

示例9: newTrip

 public function newTrip()
 {
     if (!Session::get('logged')) {
         return Redirect::to('/');
     }
     $carId = Session::get('car_id');
     $car = Cars::find($carId);
     $clients = Client::all();
     if (!$car instanceof Cars) {
         $carId = 0;
         $carName = 'N/A';
         $carRegistration = 'N/A';
     } else {
         $carId = $car->id;
         $carName = $car->name;
         $carRegistration = $car->registration;
     }
     return View::make('driver/newTrip')->with('car', array('car_id' => $carId, 'car_name' => $carName, 'car_reg' => $carRegistration))->with('clients', $clients);
 }
开发者ID:ardyaryan,项目名称:presidential-car-api,代码行数:19,代码来源:DriverController.php

示例10: testShorthand

 /**
  * Test shorthand
  *
  * @return void
  */
 public function testShorthand()
 {
     $clients = Client::all();
     $columns = array('name', 'Birthdate' => function ($row) {
         return date('d-M Y', strtotime($row->birth_date));
     }, 'lead_source' => array('heading' => 'Lead Source', 'value' => function ($row) {
         return Client::select_value('lead_source', $row->lead_source);
     }));
     $expected_horizontal = $this->markup('classconfig_horizontal');
     $expected_vertical = $this->markup('classconfig_vertical');
     $table = Squi\Table::make($columns, $clients, 'vertical');
     $this->assertSame($expected_vertical, $table->render());
     $table = Squi\Table::horizontal($columns, $clients);
     $this->assertSame($expected_horizontal, $table->render());
     $table = Squi\Table::vertical($columns, $clients);
     $this->assertSame($expected_vertical, $table->render());
     $table = Squi\Table::of('Client', $clients, 'summary_columns');
     $expected = $this->markup('classconfig_summary');
     $this->assertSame($expected, $table->render());
     $table = Squi\Table::of($clients);
     $this->assertSame($expected_horizontal, $table->render());
     $table = Squi\Table::of('Client', $clients);
     $this->assertSame($expected_horizontal, $table->render());
 }
开发者ID:SerdarSanri,项目名称:laravel-squi,代码行数:29,代码来源:table.test.php

示例11: index

 /**
  * Display a listing of clients
  *
  * @return Response
  */
 public function index()
 {
     $clients = Client::all();
     return View::make('clients.index', compact('clients'));
 }
开发者ID:tharindarodrigo,项目名称:agent,代码行数:10,代码来源:ClientsController.php

示例12: testEmptyLinesInFile

 public function testEmptyLinesInFile()
 {
     $this->resetEvents();
     $fileName = "with_empty_lines.csv";
     $path = $this->copyFileToTemp($fileName);
     $s = $this->service();
     $companyId = rand(1000, 1000000);
     $fileDetails = ["year" => 2015, "month" => 7];
     $rpf = $s->process($path, $companyId, $fileDetails);
     $this->assertTrue($rpf->status == RoyaltyPaymentFile::STATUS_PAYMENTS_PROCESSED);
     $rpf = $s->processRoyaltyStreams($rpf);
     $this->assertTrue($rpf->status == RoyaltyPaymentFile::STATUS_PROCESSED);
     $payments = RoyaltyPayment::all();
     $this->assertTrue(count($payments) == 4);
     $this->assertTrue($payments[0]->payee_code == 1128);
     $this->assertTrue($payments[1]->payee_code == 1111);
     $this->assertTrue($payments[2]->payee_code == 1545);
     $this->assertTrue($payments[3]->payee_code == 1332);
     $clients = Client::all();
     $this->assertTrue(count($clients) == 4);
     $payeePayments = PayeePayment::all();
     $this->assertTrue(count($payments) == 4);
     $deals = Deal::all();
     $this->assertTrue(count($deals) == 4);
     $streams = RoyaltyStream::all();
     $this->assertTrue(count($streams) == 4);
     $this->assertTrue($streams[0]->song_number == 33959);
     $this->assertTrue($streams[1]->song_number == 14402);
     $this->assertTrue($streams[2]->song_number == 12043);
     $this->assertTrue($streams[3]->song_number == 51311);
     $streamFiles = RoyaltyStreamFile::all();
     $this->assertTrue(count($streamFiles) == 4);
     $this->resetEvents();
 }
开发者ID:alternativex,项目名称:Backend-app,代码行数:34,代码来源:RoyaltyPaymentFileServiceTest.php

示例13: getList

 public function getList()
 {
     $clients = Client::all();
     return View::make('client.list')->with('clients', $clients);
 }
开发者ID:GoatEli,项目名称:TechnicSolder,代码行数:5,代码来源:ClientController.php

示例14: hash_passwords

 function hash_passwords()
 {
     $clients = Client::all();
     foreach ($clients as $client) {
         $pass = $client->password_old;
         $client->password = $client->set_password($pass);
         $client->save();
     }
     redirect('clients');
 }
开发者ID:timclifford,项目名称:freelance-manager,代码行数:10,代码来源:clients.php

示例15: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $clients = Client::all();
     return View::make('clients.index')->with('clients', $clients)->with('title', 'Clients');
 }
开发者ID:x4rMa,项目名称:Vehicle-Inspection-System,代码行数:10,代码来源:ClientController.php


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