Welcome Guest, Not a member yet? Register   Sign In
Routing with variables

(This post was last modified: 11-18-2021, 03:59 AM by chakycool.)

with "(:num)" I get a 404 error.

404 - File Not Found
Controller or its method is not found: \App\Controllers\Admin::index

if I use it as ":num" the page loads but "$1" is passed as the variable but not what's in the URL

(This post was last modified: 11-18-2021, 08:18 AM by captain-sensible. Edit Reason: extra )

yes @InsiteFX i pointed that out in #2 then forgot in #6 i guess i have a short term memory problem developing ?

whats the base url set to in app/Config/App.php ?

mine on local dev is ;:
public $baseURL = '';

you see that forward slash on the end .

None of my routes have a "/" at beginning

A route should be setting up url on left then determining on right what class and method to use , so surely Class::method is all thats needed ?
I use Arch Linux by the way 

CMS in Action

My local URL


'Admin/Reports/' is the path to the file (controller).

'Brands' is the controller

'stores' is the function.

PHP Code:


Cry Cry  feel very stupid now. 'InsiteFX' gave the right code and I still didn't follow it. 
thank you 'iRedds'  Big Grin Big Grin

Theme © iAndrew 2016 - Forum software by © MyBB