Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. buy?min_year=1880&max_year=2019&min_rating=1&max_rating=10&genre=horror
  2.  
  3. $url = Request::path();
  4.  
  5. if (isset($_GET["state"]) && !empty($_GET['state'])) {
  6. $state = $_GET['state'];
  7. $url = $url . "&state=". $state;
  8.  
  9. }
  10. if (isset($_GET["council"]) && !empty($_GET['council'])) {
  11. $council = $_GET['council'];
  12. $url = $url . "&council=". $council;
  13.  
  14. }
  15. if (isset($_GET["area"]) && !empty($_GET['area'])) {
  16. $area = $_GET['area'];
  17. $url = $url . "&area=". $area;
  18.  
  19. {{ Form::open(array('url' => $url, 'class' => 'form-inline', 'method' => 'GET')) }}
  20.  
  21. /buystate=NY?min_year=1880&max_year=2019&min_rating=1&max_rating=10&genre=horror
  22.  
  23. /buy?state=NY&min_year=1880&max_year=2019&min_rating=1&max_rating=10&genre=horror
  24.  
  25. // Route::post(.... for forms)
  26. Route::get('buy/{state}/{min_year}', function($state, $min_year) {
  27. return array('state' => $state, 'min_year' => $min_year);
  28. });
  29.  
  30. Route::group(array('prefix' => '/state'), function(){
  31. Route::get('/{min_year}'), function() {
  32. //... and so on
  33. });
  34. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement