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


PHP Request::getQueryString方法代码示例

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


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

示例1: getValues

 /**
  * Creates an array representation (Map) of the Query String parameters present.
  *
  * @return array
  */
 public function getValues()
 {
     $qs = Request::getQueryString();
     $result = [];
     // if we don't have any params at all
     if (strpos($qs, '=') === FALSE) {
         return $result;
     }
     // if we have multiple params set
     if (strpos($qs, '&') !== FALSE) {
         foreach (explode('&', $qs) as $segment) {
             $result[] = $this->splitSegment($segment);
         }
         return $result;
     }
     // if we only have one set
     return [$this->splitSegment($qs)];
 }
开发者ID:noherczeg,项目名称:restext,代码行数:23,代码来源:QueryStringOperations.php

示例2: category

 public function category()
 {
     //列表
     $para = Request::getQueryString();
     $shops = $this->shop->getGoods($this->shop, $para, '', 'copy');
     //推荐的前三个
     $filter = [['recomment', '=', 1], ['num', '=', 1], ['status', '=', 1]];
     $fields = ['id', 'title', 'category_id', 'price', 'thumb'];
     $order = [['sorts', 'asc'], ['updated_at', 'desc']];
     $shops['recomment_lists'] = $this->shop->getShopList($this->shop, $filter, $fields, $order, 0, 3, 0);
     //分类
     $shops['categories'] = $this->categories;
     //当前分类
     $shops['category'] = $this->category->find(Request::get('b'))->name;
     //价格区间
     $shops['price'] = Config::get("shop::copy.price");
     //交易方式
     $shops['trade'] = Config::get("shop::copy.trade");
     $shops['url'] = 'shop.copy.category';
     return View::make('shop::copy.category', compact('shops'));
 }
开发者ID:leebivip,项目名称:laravel_cmp,代码行数:21,代码来源:CopyController.php

示例3: category

 public function category()
 {
     //列表
     $para = Request::getQueryString();
     $shops = $this->shop->getGoods($this->shop, $para, '', 'logo');
     //分类
     $shops['categories'] = $this->categories;
     if (Request::get('b')) {
         $b = Request::get('b');
         if (preg_match("/^[0-9]+\$/", $b)) {
             $shops['recomment_category'] = $this->category->find($b)->toArray();
         } else {
             $c_arr = explode('c', $b);
             $shops['recomment_category'] = $this->category->find($c_arr[0])->toArray();
         }
     } else {
         $shops['recomment_category'] = $this->reco_categories;
     }
     //dd($shops['recomment_category']);
     //组合类型
     $shops['combine'] = Config::get("shop::logo.combine");
     //价格区间
     $shops['price'] = Config::get("shop::logo.price");
     //交易方式
     $shops['trade'] = Config::get("shop::logo.trade");
     $shops['url'] = 'shop.logo.category';
     return View::make('shop::logo.category', compact('shops'));
 }
开发者ID:leebivip,项目名称:laravel_cmp,代码行数:28,代码来源:LogoController.php


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