Questions tagged [phalcon-routing]

Routing in Phalcon Framework's MVC implementation. Phalcon is an open source PHP web application framework, and it is released under the BSD license.

phalcon-routing provides advanced routing capabilities. In MVC mode, you can define routes and map them to controllers/actions that you require.

The router component allows defining routes that are mapped to controllers or handlers that should receive the request. A router simply parses a URI to determine this information. The router has two modes: MVC mode and match-only mode. The first mode is ideal for working with MVC applications.

109 questions
0
votes
1 answer

Is there a way to use hash mark in Phalcon route pattern?

Is there a way to use hash mark in route pattern? I tried to use backslash before hash mark \#, but no result. My code: use Phalcon\Mvc\Router\Group; $gr = new Group([ 'module' => 'home', ]); $gr->addPost("/item/view/([0-9]*)/#([0-9]*)", [ …
Lena
  • 84
  • 6
0
votes
1 answer

phalcon router not despatching

I have this in the top of my index.php:
gedq
  • 609
  • 9
  • 20
0
votes
1 answer

Undefined variable: user in view on line 60 NULL Phalcon

I'm trying to pass an array in redirect to another page but it say undefined variable user return $this->response->redirect($this->MyHelper->Route('eb-user-verify-reset-password-code'), $User->toArray()); How can I access $user->toArray() in the…
Iftikhar uddin
  • 3,117
  • 3
  • 29
  • 48
0
votes
2 answers

Phalcon Routing exclude Routing to Controllers when File Exists

I have some css .map files directly under assets folder, however for some reason they failed to load and i get a 404 error in the dispatcher and router. Any solution on how to fix this issue ? i added following config to the router but still get the…
mahen3d
  • 7,047
  • 13
  • 51
  • 103
0
votes
2 answers

Phalcon PHP: Dispatcher's `forward` function does not work

Within the reentryAction in my CustomerclientController I want to forward into the indexAction in case of successful validity check of the post parameters. Unfortunately, the forward doesn't work. While debugging, I determined that the…
0
votes
1 answer

Phalcon installation on ubuntu 16.04 LTS with XAMPP server

I hope you have a good day, I need your help. I do not know how to install Phalcon 3 in my version of ubuntu. I would like you to indicate to me every step I have to take, thank you very much! Please!
0
votes
1 answer

Micro app router map->via with collections?

I'm setting up a Phalcon app using the Micro class. I'm setting up my router to use the Collection class so that I can use a controller to split up the functionality and keep it fairly contained. Now, what I'd like to do is have a route that…
Andy
  • 110
  • 10
0
votes
3 answers

Define dynamic actions/slugs with Routers in PhalconPHP

I have a website made in PHP Phalcon, and it has several controllers. Now I need this website to receive words in the URL (example.com/WORD) and check if they exist in the database, but I must continue to support other controllers like…
Salvi Pascual
  • 1,788
  • 17
  • 22
0
votes
1 answer

How to define route in phalcon

I have controller named GlossaryController with 2 actions indexAction and anotherAction in view i have a directory glossary and index.volt file i want to define a route with parameters for example http://localhost/project/glossary/another/params it…
0
votes
1 answer

Phalcon PHP not routing for subdomain

I have one website, let's call it www.main.com, which is located on the server at /home4/username/public_html/main. This site is running Phalcon PHP with no issues at all. Now I have made a subdomain, let's call it test.main.com, and used cPanel to…
Jakob
  • 1,129
  • 9
  • 24
0
votes
1 answer

Phalcon\Micro: Execute another controller action in action

I have a controller action which gets executed on one server. This action has to trigger two other services which can be on the same or other server (depending on the configured routes). Currently I always use HTTP requests. But if the services are…
velop
  • 3,102
  • 1
  • 27
  • 30
0
votes
1 answer

Phalcon route not working, all urls access index

I use phalcon-dev-tools-v2.0.13 create a project named test,I accessed root url "/",it worked!then,I change some code like this: it worked! but: i add another url ,it didn't work! what's the matter? I'm a Phalcon fresher,i followed the Phalcon…
RyuGou
  • 71
  • 1
  • 6
0
votes
0 answers

Controllers do not work

I've recently started to use Phalcon framework. It looks very good with one minor exception - I cannot make controllers work. This is what I have: //IndexController.php namespace MyNamespace\Controller; use Phalcon\Mvc\Controller; class…
Jacobian
  • 10,122
  • 29
  • 128
  • 221
0
votes
1 answer

Phalcon 3.0 to Phalcon 2.0 compatibilty

I had created a barebone Phalcon 3.0 project with Devtools 3.0, it worked fine on my machine Then I uploaded to my web host service, and it reproduced error message: Argument 1 passed to Phalcon\Di\Injectable::setDI() must implement interface…
0
votes
0 answers

PHP Phalcon Routing with file extension

In my PHP Phalcon 3 Application I have a custom route: $router->add("/{chapter}/{name}.{type:[a-z]+}", array( "controller" => 'images', "action" => 'getFile', )); I test the application local with PHP Builtin Server, other…
ghovat
  • 1
  • 2