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


PHP App::make方法代码示例

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


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

示例1: __construct

 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes);
     $this->errors = new MessageBag();
     $this->validator = \App::make('validator');
     $this->manejaConcurrencia = true;
 }
开发者ID:kentronvzla,项目名称:webkentron,代码行数:7,代码来源:BaseModel.php

示例2: answer

 /**
  * @param $text
  * @return $this
  */
 public function answer($text)
 {
     if (\Config::get('gitter.output')) {
         $client = \App::make(Client::class);
         $room = \App::make(Room::class);
         $client->request('message.send', ['roomId' => $room->id], ['text' => (string) $text], 'POST');
     }
     return $this;
 }
开发者ID:Dualse,项目名称:GitterBot,代码行数:13,代码来源:Message.php

示例3: storeResultsAdmin


//.........这里部分代码省略.........
                 //                         'fragment' => 0,
                 //                         'a' => 0,
                 //                         'h1' => 0,
                 //                         'title' => 0,
                 //                         'plain-diff' => 1,
                 //                         'plain-sample' => 0,
                 //                         'fragment-diff' => 0,
                 //                         'fragment-sample' => 0,
                 //                         'a-diff' => 0,
                 //                         'a-sample' => 0,
                 //                         'h1-diff' => 0,
                 //                         'h1-sample' => 0,
                 //                         'title-diff' => 0,
                 //                         'title-sample' => 0
                 //                                     ]], $client_for_storing);
                 $client_for_storing = [$query => ['0' => $query, 'body' => 0, 'plain' => 1, 'fragment' => 0, 'a' => 0, 'h1' => 0, 'title' => 0, 'plain-diff' => 1, 'plain-sample' => 0, 'fragment-diff' => 0, 'fragment-sample' => 0, 'a-diff' => 0, 'a-sample' => 0, 'h1-diff' => 0, 'h1-sample' => 0, 'title-diff' => 0, 'title-sample' => 0]] + $client_for_storing;
             }
         }
     }
     foreach ($asis_info['units'] as $unit) {
         $client_for_storing[$unit[0]][$unit[1]] += -1;
         if ($unit[1] == 'plain') {
             $client_for_storing[$unit[0]]['plain-diff'] += -1;
         }
     }
     //delete from client-report units with only "0" values
     //which can appear after subtractions
     foreach ($client_for_storing as $unit => $unit_arr) {
         if (array_unique(array_values($unit_arr)) == array($unit, 0)) {
             unset($client_for_storing[$unit]);
         }
     }
     //store to admin file
     $excel = \App::make('excel');
     $storagefile = Excel::create($filename, function ($excel) use($data_for_storing, $project, $words_admin, $refs_admin, $refs_per_query, $asis_info) {
         $excel->sheet("Admin", function ($sheet) use($data_for_storing, $project, $words_admin, $refs_admin, $refs_per_query, $asis_info) {
             $sheet->getStyle("C1:C999")->getAlignment()->setWrapText(true);
             $sheet->freezeFirstRowAndColumn();
             $sheet->fromArray($data_for_storing, null, 'A1', false, true);
             $sheet->prependRow(array($project->dir));
             $row_num = 1;
             $sheet->setHeight($row_num, 20);
             $row_num++;
             $sheet->setHeight($row_num, 20);
             foreach ($data_for_storing as $unit => $arr) {
                 $row_num++;
                 $sheet->setHeight($row_num, 20);
             }
             $sheet->appendRow($row_num + 1, $words_admin);
             $sheet->setHeight($row_num + 1, 20);
             $sheet->appendRow($row_num + 2, $refs_admin);
             $sheet->setHeight($row_num + 2, 200);
             $sheet->row($row_num + 2, function ($row) {
                 $row->setTextRotation(90);
             });
             //merge cells for queries and prepare array for inserting
             $curr_column_index = 3;
             $query_admin = ["", "", ""];
             for ($i = 1; $i <= 5; $i++) {
                 //the same operation for five zones
                 foreach ($refs_per_query as $query => $merge_length) {
                     $start_cell_column = $sheet->getCellByColumnAndRow($curr_column_index, $row_num + 3)->getColumn();
                     $end_cell_column = $sheet->getCellByColumnAndRow($curr_column_index + $merge_length - 1, $row_num + 3)->getColumn();
                     $sheet->mergeCells($start_cell_column . ($row_num + 3) . ":" . $end_cell_column . ($row_num + 3));
                     $query_admin[] = $query;
                     if ($merge_length - 1 > 0) {
开发者ID:hvs-fasya,项目名称:seo_padawan,代码行数:67,代码来源:Storekeeper.php

示例4: __construct

 /**
  * ShopifyService constructor.
  */
 public function __construct()
 {
     $this->api = \App::make('ShopifyAPI');
     $this->api->setup(['API_KEY' => config('app.shopify_api_key'), 'API_SECRET' => config('app.shopify_api_secret'), 'SHOP_DOMAIN' => config('app.shopify_shop_domain'), 'ACCESS_TOKEN' => config('app.shopify_access_token')]);
     $this->api->installURL(['permissions' => array('read_orders', 'read_products')]);
 }
开发者ID:breenyoung,项目名称:wfadmin,代码行数:9,代码来源:ShopifyService.php

示例5: addKarmaTo

 /**
  * @param User $user
  * @param Message $message
  * @return static
  */
 public function addKarmaTo(User $user, Message $message)
 {
     return Karma::create(['room_id' => \App::make(Room::class)->id, 'message_id' => $message->gitter_id, 'user_id' => $this->id, 'user_target_id' => $user->id, 'created_at' => $message->created_at]);
 }
开发者ID:Dualse,项目名称:GitterBot,代码行数:9,代码来源:User.php


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