All Questions
486
questions
1
vote
0
answers
20
views
Unable to use both route options and a nested resource callback in CakePHP 5.x
I'm trying to use nested restful routing by CakePHP 5, but it seems impossible to use both route options as an array, and nested resource definition as a callback. The following example does not work ...
0
votes
1
answer
27
views
How to disable auto routing in CakePHP?
In CakePHP, the routing works based on controller and action but I wanted to disable the auto-routing based on controller and action on URL so that the defined routes can only be accessible.
For ...
0
votes
2
answers
83
views
Routing Middleware does not preserve headers
I try to handle CORS for the API scoped route. If i get an OPTION request i return the response immediately so the application does not have to handle it. But if i receive a GET request i add the ...
0
votes
1
answer
51
views
CakePHP 2.9 $this->Auth->user('id') is null
I'm having an issue where my CakePHP application is not retrieving any user data. It's authenticating me, but then there's no ID value whatsoever.
After careful checking of the docs, I realize the ...
-1
votes
1
answer
111
views
CakePHP Routing new directory
I am setting up my cakephp project on a local test environment from my GIT repo.
it is accessed like so:
localhost/projectName/controller/action
However, i get an error saying the controller "...
0
votes
1
answer
49
views
REST setup in routes.php is not working when having two words controller names
We are using CakePHP 3.10.*, friendsofcake/crud ^5.0 and friendsofcake/crud-json-api ^0.4.0. Lately we've been having trouble getting requests to the FirmantesExternosController to be handled ...
0
votes
2
answers
350
views
How to use one Route for a controller to hit all actions in Laravel 8
I switched to Laravel 8 from CakePhp and I would like to know if it's possible to use only one route for all the actions in a controller. I found "Implicit Controllers" for Laravel 4.2 but ...
0
votes
2
answers
1k
views
CakePHP 4 - Admin prefix routing with i18n language parameter
I have cakephp4.2 project, i have implemented multilanguage approach where current language is sept in session. urls are same for all languages.
I want to add language parameter in url also. I tried ...
0
votes
1
answer
67
views
Create two actions on the same view file in cakephp?
I have a profile page where the url looks like this:
/ClinicalAnnotation/Participants/profile/11
I want to create this /ClinicalAnnotation/Participants/profile/11/submitreview/1
How can I do this with ...
0
votes
0
answers
120
views
CakePHP 2.10 Routing one unique slug multiple models
I have been attempting to modify a clients website by allowing /slug to access both the pages and users models/controllers. I have read all of CakePHP 2 Routing book, however it does not go into ...
0
votes
0
answers
35
views
CakePHP route does not receive parameter
I've created a router in route.php as shown below
Router::connect('/reset-password/:token/', array('controller' => 'users', 'action' => 'resetPassword'));
When i access the web site example.com/...
4
votes
0
answers
2k
views
Cakephp 4 Url->build with array throws route not found error, but not with string
I'm trying to set up cakephp 4 with prefix routing. In my home.php, I have the following code set up (focusing on the html a href tag under "Serving Ones"):
<?php if ($prefix == 'serving' || $...
0
votes
3
answers
794
views
CakePHP route redirect with parameters
I need to keep SEO links active so I'm trying to 301 redirect google trafic to new CakePHP route.
I go to:
http://localhost/jakne/someCategory/item-slug
And I want it to 301 redirect to:
http://...
0
votes
0
answers
113
views
CakePHP 4 Routing Regex Pattern
Hello currently i will do a email verification. For that i have in my UsersController the method verify
public function verify($userid, $code)
{
//...
}
Now on my routing i have ...
0
votes
0
answers
191
views
How to create sub set of controllers / routes in CakePHP
What would be the correct syntax in CakePHP for sending all routes with an "api" prefix to an API controllers sub folder? According to the documentation it appears that this should be done through a ...