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


PHP Service::where方法代码示例

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


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

示例1: exists

 public static function exists($service_id)
 {
     $service = Service::where('id', '=', $service_id)->count();
     if ($service > 0) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:jacobDaeHyung,项目名称:PHPLaravelGymManagementSystem,代码行数:9,代码来源:Service.php

示例2: getUpdate

 public function getUpdate($business_id, $field, $value)
 {
     $first_branch = Branch::where('business_id', '=', $business_id)->first();
     $first_service = Service::where('branch_id', '=', $first_branch->branch_id)->first();
     if (QueueSettings::serviceExists($first_service->service_id)) {
         QueueSettings::updateQueueSetting($first_service->service_id, $field, $value);
     } else {
         QueueSettings::createQueueSetting(['service_id' => $first_service->service_id, 'date' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), $field => $value]);
     }
     return json_encode(['success' => 1]);
 }
开发者ID:reminisense,项目名称:featherq-laravel5,代码行数:11,代码来源:QueueSettingsController.php

示例3: run

 public function run()
 {
     $event = Ssms\Event::create(['name' => 'user.add', 'description' => 'When a new user is added']);
     $this->attach($event, Service::whereName('hipchat')->get());
     $event = Ssms\Event::create(['name' => 'user.delete', 'description' => 'When a user is deleted']);
     $this->attach($event, Service::whereName('hipchat')->get());
     $event = Ssms\Event::create(['name' => 'server.up', 'description' => 'When a server is back up after being down']);
     $this->attach($event, Service::all());
     $event = Ssms\Event::create(['name' => 'server.down', 'description' => 'When a server is down (retry threshold breached)']);
     $this->attach($event, Service::all());
     $event = Ssms\Event::create(['name' => 'server.updating', 'description' => 'When a server is updating']);
     $this->attach($event, Service::where('name', 'email')->orWhere('name', 'hipchat')->get());
     $event = Ssms\Event::create(['name' => 'server.restart', 'description' => 'When a server is restarting']);
     $this->attach($event, Service::whereName('hipchat')->get());
 }
开发者ID:Zipcore,项目名称:Sourcemod-Server-Manager-System,代码行数:15,代码来源:EventsTableSeeder.php

示例4: getServiceNames

 public function getServiceNames($outlet_id)
 {
     Activity::log(['contentId' => $outlet_id, 'contentType' => 'OutletService', 'action' => 'GetServiceNames', 'description' => 'Get List Service for an Outlet', 'details' => 'Outlet Id: ' . $outlet_id, 'updated' => false]);
     return Service::where('outlet_id', '=', $outlet_id)->get();
 }
开发者ID:EricBui0512,项目名称:FYP,代码行数:5,代码来源:RetailerRepository.php

示例5: User

ActiveMongo::connect("test");
User::drop();
Service::drop();
/* Create an user for our 'aggregator' */
$user = new User();
$user->username = "crodas";
$user->password = "crodas";
$user->save();
/* Now we are going to query for the services for  
 * the new user, it will return an empty
 * dataset, but we're going to create a 'dynamic' reference
 * to the 'query'. When this reference is deference
 * then same 'query' is going to be asked to the database.
 */
$service = new Service();
$service->where('user', $user->getID())->doQuery();
/* save reference */
$user->services = $service->getReference(TRUE);
$user->save();
/* Create one service, note that Service::user is $user->getID() */
$twt = new Twitter();
$twt->user = $user->getID();
$twt->rss = "http://twitter.com/statuses/user_timeline/crodas.rss";
$twt->save();
/* Create another service */
$blg = new Blog();
$blg->user = $user->getID();
$blg->rss = "http://crodas.org/feed/rss";
$blg->save();
/* Create another service */
$blg1 = new Blog();
开发者ID:284099857,项目名称:ActiveMongo,代码行数:31,代码来源:App.php


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