Questions tagged [fuelphp-routing]

FuelPHP is a flexible PFP5 web framework.

FuelPHP's routing can range from simple static routes to advanced routes using HTTP verb based routing.

In-detail information on the subject can be found in official documentation.

14 questions
4
votes
4 answers

Is it possible to route all URLs with dashes in FuelPHP?

In the following configuration is it possible to use a regular expression or any other method besides specifing each route to use controller thisisatest when URL is this-is-a-test/action? Would I have to build/extend my own Router…
JRomero
  • 4,878
  • 1
  • 27
  • 49
1
vote
2 answers

Routing Issue With FuelPHP

I'm using FuelPHP to create a simple web app with a photo gallery. All photos must belong to a gallery, and may only belong to one gallery. Given that a photo must exist as a component of a gallery, I want my URL structure to look something like the…
rybosome
  • 5,046
  • 7
  • 44
  • 64
1
vote
1 answer

Redirecting controller control to sub-controller

I'm using FuelPHP for my website. Currently, I've the following structure: -folder1 -FILEHERE.php -folder2 ... -fuel -app -classes -controller -learn.php -folder1.php -public I've created a controller in…
mehulmpt
  • 15,861
  • 12
  • 48
  • 88
1
vote
1 answer

Route to public directory fuelphp

I am building an app in fuelphp, and I'd like to route to a page of fully static content. For example, I have a file I'd like to display in public/assets/html/pages/mypage.html, but i'd like to see that static content when I navigate to…
johncorser
  • 9,262
  • 17
  • 57
  • 102
1
vote
1 answer

User "?" in fuelphp router

I config a router 'users/user(/fields=:fname,:lname,:age)?' => 'users/user/$1/$2/$3', used: /users/user/fields=John,Smith,33 (fname = John, lname = Smith, age = 33) I want config like users/user?fields=John,Smith,33 but I can't use "?" in a…
QHu91_IT
  • 189
  • 2
  • 12
1
vote
1 answer

How to disable 'routed mode' for modules?

On the FuelPHP documentation located here http://fuelphp.com/docs/general/modules.html it states: "When you use modules in routed mode,..." This implies there's a non-routed mode for modules. Basically i don't want fuel to route to modules…
user1448020
  • 147
  • 1
  • 10
1
vote
1 answer

Fuelphp - route index with parameters

Using Fuelphp, I'd like to be able to use a URL system similar to here on StackOverflow to get to specific pages. Desired behavior: -stackoverflow.com/questions -> page with many questions -stackoverflow.com/questions/1982 ->page with specific…
tmpearce
  • 12,523
  • 4
  • 42
  • 60
1
vote
2 answers

Interrupt FuelPHP REST controller flow and display response

I am using FuelPHP's rest controller. I am trying to break the flow and display my response after encountering an error. Here is my basic flow needed: When any of the methods are called I run a "validate" function, which validates parameters and…
zechdc
  • 3,374
  • 9
  • 40
  • 52
1
vote
3 answers

Public and Fuel folder in the same subdirectory, but no public/ in the URL

After reading over and over again the Installation Instructions for Fuel PHP (which I'm loving), I can't figure out how to make the app work without the url showing public/, and without moving the fuel folder from the docroot. (so it's all…
AeroCross
  • 3,969
  • 3
  • 23
  • 30
0
votes
2 answers

Is it possible for FuelPHP not to allow the right side of the route?

In config/routes.php 'users/account/change_password', ); I can access site.com/users/account/change_password and site.com/users/account/change_password in the browser. Is there a way to…
zgosalvez
  • 384
  • 1
  • 5
  • 22
0
votes
1 answer

FuelPHP \URI::current() does not get file extension

My project requires me to know what file extension was used while calling a route. For example, If the route was 127.0.0.1/controller/action/filea.json Then then I would need to have a function that returns ".json" when called from inside action…
Nitro
  • 1,063
  • 1
  • 7
  • 17
0
votes
1 answer

Reversing controller argument order in routes file fuelphp

I am running a fuelphp app with a route that looks like this: 'lastname/:lastname/firstname/:firstname'=> '(@api)/mycontroller/my_method/$2/$1', And then I have a method on my controller like this: public function get_my_method($firstname,…
johncorser
  • 9,262
  • 17
  • 57
  • 102
0
votes
1 answer

Fuelphp - pass default parameter to a controller in a rewrote route

I want to do something I thought was pretty basic using fuelphp Basically I need to use multiple urls with only one controller, and assign each different route a default parameter (a cat id for that matter) For instance in my Listing controller I…
titiyoyo
  • 911
  • 1
  • 11
  • 28
0
votes
1 answer

fuelPHP: Can't Access My Controllers Directly

I am trying to learn fuelPHP and I came form a CI background. I am using this tutorial so that I can familiarize myself on this. http://net.tutsplus.com/tutorials/php/getting-started-with-the-fuel-php-framework/ My problem is in step 2. When I…
Mr A
  • 1,345
  • 4
  • 22
  • 51