We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Tutorial missing some understanding

I have follow the tutorial here https://docs.phalcon.io/en/latest/reference/tutorial.html#creating-a-controller

Here is the Signup controller (app/controllers/SignupController.php):

<?php

class SignupController extends \Phalcon\Mvc\Controller
{

public function indexAction()
{

}

}

The empty index action gives the clean pass to a view with the form definition (app/views/signup/index.phtml):

I did not see the code that pass from controller to view: app/views/signup/index.phtml

Hi, skanel.

Because name of controller class is 'SignupController'. You need no code about that.

You can find description at here: Using Views — Phalcon 1.3.0 documentation https://docs.phalcon.io/en/latest/reference/views.html

Thanks.

edited Sep '14

So You mean ,I need to create one more sub folder signup in side the views folder ?



5.9k
Accepted
answer

Hi, skanel.

Yes, you need to create app/views/signup folder. Did you create (app/views/signup/index.phtml)?

If you want to show that view, action method "indexAction()" need no code.

I think "the clean pass" means that "indexAction()" gives nothing to view.

Thanks.