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
1
vote
1 answer

Phalcon Routing not working in Nginx

I just moved from development to production. I realized my routing is not working in the production environment. I am using a LEMP stack. Can anyone guide me in the right direction? This is my nginx configuration. server { listen 80; server_name…
Slay
  • 1,285
  • 4
  • 20
  • 44
1
vote
1 answer

Configuring Nginx for Phalcon on a Plesk 11.5 server

I've been working on a project with Phalcon in local development environment (Vagrant + Virtualbox). It just works great and my development time really decreased. Now I would like to put this project online in a Plesk 11.5 nginx environment and I…
ArticSun
  • 11
  • 1
1
vote
4 answers

Phalcon forward to different module

Trying to work my way through setting up a phalcon mvc application. I have 2 modules current set up for testing. "Frontend" and "Admin". I have different views set up so I can confirm I am getting through to each of the modules. When I change the…
1
vote
3 answers

Unable to use flash messages within if($_POST) condition in PhalconPHP

I have this in my Signin controller to listen for a $_POST data:
user3797244
  • 53
  • 1
  • 5
1
vote
4 answers

Phalcon: not found page error handler

how to create 404 error page for manual bootstrap for example in this app ? http://album-o-rama.phalconphp.com/ i use this dispatcher : $di->set( 'dispatcher', function() use ($di) { $evManager = $di->getShared('eventsManager'); …
a.4j4vv1
  • 123
  • 3
  • 11
1
vote
3 answers

Phalcon router doesn't react to subfolders and namespace declaration

So I've been reading a ton of stackoverflow and phalcon forum threads.. (I'm starting to hate this framework), but nothing seem to work and it doesn't explain why like Laravel does, for example. I'm just trying to be able to operate with this…
deb0rian
  • 966
  • 1
  • 13
  • 37
0
votes
2 answers

phalcon GET routes allowing any other non http method to make successful request to that route

I'm using Phalcon\Mvc\Router to map the routes and I have a GET route /api/test like this, $router = new \Phalcon\Mvc\Router(false); $router->addGet('/api/test', [ 'module' => 'api', 'controller' => 'test', …
0
votes
2 answers

Phalcon routing correctly pattern

Help with routing settings, there is the following request template with frontend: /books/([0-9]+)/book-authors/([0-9]+)/images There is a controller located in namespace: Shop\Controllers\Books\BookAuthors\ImagesController The controller has an…
0
votes
2 answers

i was execute phalcon (php) on xampp but i got messages "Wrong number of parameters"

Wrong number of parameters #0 C:\xampp1\htdocs\crud_by_phalcon\app\config\router.php(7): Phalcon\Mvc\Router->handle() #1 C:\xampp1\htdocs\crud_by_phalcon\public\index.php(20): include('C:\xampp1\htdoc...') #2 {main} this is my code…
Tediace
  • 1
  • 2
0
votes
1 answer

Phalcon 4.0 PHP - Controller handler class cannot be loaded

I am trying to create a basic application with Phalcon locally. I followed the documentation (https://docs.phalcon.io/4.0/en/tutorial-basic) and I created the same file structure and I copied the code for all the files. Unfortunately, the error…
0
votes
3 answers

Phalcon 4 documentation controller handler issue

I'm Using Phalcon 4.0.6 on windows 10,x64bit with psr & php version is 7.4.7. I follow basic tutorial example from "https://docs.phalcon.io/4.0/en/tutorial-basic" but I'm getting error like: "Exception: SingleController handler class cannot be…
Styled Bee
  • 141
  • 1
  • 12
0
votes
1 answer

How to connect to database in Phalcon Framework 3.2.4 using SSL

I am trying to connect to the database in Phalcon Framework 3.2.4 using SSL. Getting error: SQLSTATE[HY000] [1045] Access denied for user 'dev_user'@'XXX.XX.XX.XXX' (using password: YES) My database/config.php: return new \Phalcon\Config(array( …
jones
  • 749
  • 7
  • 34
0
votes
1 answer

Phalcon\Mvc\View\Exception: Macro 'baseImagesURL' does not exist

I have defined a shared service baseImagesURL in my configuration Class but when I try to use it in volt it throws this error Phalcon\Mvc\View\Exception: Macro 'baseImagesURL' does not exist /** * This service helps in the setting base images…
Iftikhar uddin
  • 3,117
  • 3
  • 29
  • 48
0
votes
1 answer

How to work around with routers? I want to check if the URI is exisiting like it's controller and action

I am a newbie in Phalcon PHP and I'm currently developing a CMS. I am trying to create a blog module where the user can post blog with custom slug like with URL structure. I am having a problem on routing the URI like I want to check first if the…
Furtim
  • 23
  • 1
  • 4
0
votes
2 answers

Phalcon Routing: Url not matching the route definition

I have following routes defined in Phalcon: $router->add('/products', array( 'module' => 'products', 'namespace'=>'MyNameSpace\Products\Controllers\\', 'controller'=>'index', 'action' => 'index' )); $router->add('/products/:params',…
WatsMyName
  • 4,240
  • 5
  • 42
  • 73