Example #1
2
 /**
  * Generate a sort link for this column.
  *
  * @return string
  */
 public function sortLink()
 {
     $sort = $this->request->get('sort', []);
     if (array_has($sort, $this->getName())) {
         $sort[$this->getName()] = $this->sortReverse($sort[$this->getName()]);
     } else {
         $sort[$this->getName()] = 'asc';
     }
     return $this->request->fullUrlWithQuery(['sort' => $sort]);
 }
 /**
  * Show the application registration form.
  *
  * @param  Request  $request
  * @return Response
  */
 public function showRegistrationForm(Request $request)
 {
     if (Spark::promotion() && !$request->has('coupon')) {
         // If the application is running a site-wide promotion, we will redirect the user
         // to a register URL that contains the promotional coupon ID, which will force
         // all new registrations to use this coupon when creating the subscriptions.
         return redirect($request->fullUrlWithQuery(['coupon' => Spark::promotion()]));
     }
     return view('spark::auth.register');
 }
Example #3
1
 /**
  * Get the full URL for the request with the added query string parameters.
  *
  * @param array $query
  * @return string 
  * @static 
  */
 public static function fullUrlWithQuery($query)
 {
     return \Illuminate\Http\Request::fullUrlWithQuery($query);
 }