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


PHP Request::replace方法代码示例

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


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

示例1: handle

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $request = Request::create('/api/blocknotify', 'GET', ['key' => Mint\Settings::getVal('api_key'), 'blockhash' => $this->argument('blockhash')]);
     Request::replace($request->input());
     $response = Route::dispatch($request)->getContent();
     if ($this->option('debug')) {
         $this->info($response);
     }
 }
开发者ID:s1rxploit,项目名称:Mint,代码行数:14,代码来源:ApiBlocknotify.php

示例2: initPaging

 public function initPaging()
 {
     $request = Request::all();
     $tableState = json_decode($request["tableState"]);
     if ($tableState->pagination) {
         $perPage = !empty($tableState->pagination->number) ? $tableState->pagination->number : 20;
         Request::replace(['page' => round($tableState->pagination->start / $perPage + 1)]);
         $this->perPage = $perPage;
     }
 }
开发者ID:webfactorybulgaria,项目名称:Core,代码行数:10,代码来源:SmartTableList.php

示例3: dispatch

 /**
  * Dispatch this request.
  *
  * @param string $method
  * 
  * @return mixed
  */
 public function dispatch($method)
 {
     // Save original input.
     $original_input = Request::input();
     // Create request.
     $request = Request::create($this->uri, $method, $this->params);
     // Replace input (maintain api auth parameters).
     Request::replace(array_merge($request->input(), array('client_id' => Request::input('client_id'), 'client_secret' => Request::input('client_secret'), 'access_token' => Request::input('access_token'))));
     // Dispatch request.
     $response = Route::dispatch($request);
     // Restore original input.
     Request::replace($original_input);
     $content = $response->getContent();
     return empty($content) ? null : json_decode($response->getContent(), true);
 }
开发者ID:mmanos,项目名称:laravel-api,代码行数:22,代码来源:InternalRequest.php


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