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


PHP Request::getQueryString方法代码示例

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


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

示例1: getUrl

 /**
  * Return current url
  *
  * @return string
  */
 protected function getUrl()
 {
     $url = '/' . $this->request->path();
     $queryString = $this->request->getQueryString();
     if ($queryString) {
         $url .= '?' . $queryString;
     }
     return $url;
 }
开发者ID:understand,项目名称:understand-laravel,代码行数:14,代码来源:FieldProvider.php

示例2: index

 public function index(Request $request)
 {
     $filter = $request->except(['orderBy']);
     $limit = $request->get('limit', 20);
     $item_status = array_get($request->all(), 'item_status', array());
     $orderBy = array_get($request->all(), 'sort_by', array());
     $items = RequesitionItem::whereByFilter($filter, $limit, $orderBy);
     return view('requesitionMovements.index', ['items' => $items, 'filter' => $filter, 'urlExport' => url("/requesition-movement/download-excel?{$request->getQueryString()}"), 'item_status' => $item_status]);
 }
开发者ID:vasitjuntong,项目名称:mixed,代码行数:9,代码来源:RequesitionMovementController.php

示例3: getUrl

 /**
  * Return current url
  *
  * @return string
  */
 protected function getUrl()
 {
     $url = $this->request->path();
     if (!starts_with($url, '/')) {
         $url = '/' . $url;
     }
     $queryString = $this->request->getQueryString();
     if ($queryString) {
         $url .= '?' . $queryString;
     }
     return $url;
 }
开发者ID:understand,项目名称:understand-laravel5,代码行数:17,代码来源:FieldProvider.php

示例4: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (!\Snowfire::isRequestFromSnowfire() && !config('snowfire.debug')) {
         return \Response::make('Please request this url from a Snowfire component', 500);
     }
     $accountsRepository = app()->make('\\Snowfire\\App\\Repositories\\AccountsRepository');
     if (config('snowfire.debug')) {
         // In debug mode, use the first account id
         $app = $accountsRepository->first();
     } else {
         // Load Snowfire account based on URL
         parse_str($request->getQueryString(), $query);
         $app = $accountsRepository->getByKey($query['key']);
     }
     app()->make('view')->composer('*', function ($view) use($app) {
         $view->snowfire = $app;
     });
     app()->instance('snowfire', $app);
     return $next($request);
 }
开发者ID:snowfire,项目名称:snowfire-app,代码行数:27,代码来源:SnowfireMiddleware.php

示例5: getQueryString

 /**
  * Generates the normalized query string for the Request.
  * 
  * It builds a normalized query string, where keys/value pairs are alphabetized
  * and have consistent escaping.
  *
  * @return string|null A normalized query string for the Request
  * @static 
  */
 public static function getQueryString()
 {
     //Method inherited from \Symfony\Component\HttpFoundation\Request
     return \Illuminate\Http\Request::getQueryString();
 }
开发者ID:satriashp,项目名称:tour,代码行数:14,代码来源:_ide_helper.php

示例6: getBaseUrl

 private function getBaseUrl(Request $request)
 {
     return str_replace('?' . $request->getQueryString(), '', $request->getUri());
 }
开发者ID:samuleev,项目名称:periodic,代码行数:4,代码来源:OaiController.php

示例7: loadScripts

 public function loadScripts(Request $request)
 {
     info('Load script: ' . $request->getQueryString());
     $this->runScript('wp-admin/load-scripts.php');
 }
开发者ID:tvad911,项目名称:laravel-addon-wordpress,代码行数:5,代码来源:FileProvideController.php

示例8: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Closure $next
  * @return mixed
  */
 public function handle(Request $request, Closure $next)
 {
     $this->request->accId = $request->input('accid');
     $this->request->timestamp = $request->input('timestamp');
     $this->request->hmac = $request->input('hmac');
     $this->request->authorizationCode = $request->input('code');
     $this->request->authorizationState = $request->input('state');
     $this->request->queryString = $request->getQueryString();
     $this->session->accId = $request->session()->get('mailium_app_user_accid', null);
     $this->session->authorizationState = $request->session()->get('mailium_authorization_state', null);
     $isOauthValid = null;
     $isTokenValid = null;
     $verifyHmac = $this->request->accId && $this->request->hmac && $this->request->timestamp;
     if ($verifyHmac) {
         $isHmacValid = $this->mailiumOauthClient->verifyHmac($this->request->queryString, config('mailium-oauth.client_secret'));
         if ($isHmacValid) {
             $this->setUser($this->request->accId);
         } else {
             return response('not authorized, HMAC validation failed', 401);
         }
     } else {
         if ($this->session->accId) {
             $this->setUser($this->session->accId);
         } else {
             // we don't have a user
         }
     }
     // If this is an authorization request
     if ($this->request->authorizationCode && $verifyHmac) {
         // Check Authorization State
         if ($this->request->authorizationState == $this->session->authorizationState) {
             // Get access token
             $this->mailiumOauthClient->authorize($this->request->authorizationCode);
             $this->user = call_user_func([$this->model, 'getByAccId'], $this->request->accId);
             $this->mailium_app_just_installed = true;
             $request->session()->forget('mailium_authorization_state');
         } else {
             $request->session()->flush();
             return $this->redirectForAuthorization($request);
         }
     }
     // find out if this is an uninstall webhook request
     $uriSegments = $request->segments();
     $isUninstallWebhook = last($uriSegments) === 'uninstall';
     $userExists = $this->user;
     $shouldValidateOauth = $verifyHmac;
     // validate oauth only if this is a hmac request (to prevent oauth validation on every request)
     if ($userExists && $shouldValidateOauth && !$isUninstallWebhook) {
         // Be sure that the access token works and oauth tokens are valid
         $isOauthValid = $this->mailiumOauthClient->validateOauth($this->user->getOauthTokens());
         $isTokenValid = $this->mailiumOauthClient->verifyToken($this->user->getAccessToken());
         if (!$isTokenValid || !$isOauthValid) {
             $this->user->oauth_tokens = new \stdClass();
             $this->user->save();
         }
     }
     // If we still don't have a correlating app user then we haven't seen this user before, go to authorization url
     if ($this->user) {
         $isOauthValid = $this->mailiumOauthClient->validateOauth($this->user->getOauthTokens());
         if (!$isOauthValid) {
             return $this->redirectForAuthorization($request);
         }
     } else {
         return $this->redirectForAuthorization($request);
     }
     // From here on we are sure that we have a valid app user
     $request->session()->set('mailium_app_user_accid', $this->user->accid);
     $request->session()->forget('mailium_authorization_state');
     $this->mailiumOauthClient->setToken($this->user->getOauthTokens());
     $apiClient = new MailiumAPI3('', $this->user->getAccessToken(), '', 'json');
     // Add attributes to request
     $request->attributes->add(['mailium_app_accid' => $this->user->accid, 'mailium_app_user' => $this->user, 'mailium_app_just_installed' => $this->mailium_app_just_installed, 'mailium_api_client' => $apiClient]);
     return $next($request);
 }
开发者ID:mailium,项目名称:oauth-client-laravel,代码行数:81,代码来源:MailiumOauthClientMiddleware.php

示例9: index

 public function index(Request $request)
 {
     $filter = $request->all();
     $receives = Receive::whereByFilterAll($filter);
     return view('receives.index', ['receives' => $receives, 'urlDownloadExcel' => url("/receives/download-excel?{$request->getQueryString()}")]);
 }
开发者ID:vasitjuntong,项目名称:mixed,代码行数:6,代码来源:ReceiveController.php

示例10: talk

 public function talk(Request $request)
 {
     UpdateLog::create(['body' => $request->getContent() ?: '', 'query' => $request->getQueryString() ?: '']);
 }
开发者ID:genabasov,项目名称:remember-bot,代码行数:4,代码来源:BotController.php

示例11: handle

 /**
  * @param Store   $session
  * @param Request $request
  */
 public function handle(Store $session, Request $request)
 {
     $session->set('table::' . $request->url(), $request->getQueryString());
 }
开发者ID:huglester,项目名称:streams-platform,代码行数:8,代码来源:SaveTableState.php

示例12: custom

 public function custom(Request $request)
 {
     $query = $request->getQueryString();
     parse_str($query, $query_array);
     return view('admin.pages.reports.custom', compact('query_array'));
 }
开发者ID:sularz-maciej,项目名称:psaa-fishing-festival,代码行数:6,代码来源:ReportsController.php

示例13: makeCacheKey

 protected function makeCacheKey(Request $request)
 {
     return 'route_' . str_slug($request->path() . $request->getQueryString());
 }
开发者ID:eezhal92,项目名称:plw-webdev,代码行数:4,代码来源:MakeCacheKey.php

示例14: getUrl

 /**
  * @return string
  */
 public function getUrl()
 {
     $query = $this->request->getQueryString();
     return '/' . trim($this->request->path(), '/') . ($query ? '?' . $query : '');
 }
开发者ID:laraplus,项目名称:form,代码行数:8,代码来源:LaravelDataStore.php


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