Skip to content

Add ability to configure config, controllers, models, views directories generated in the module #1549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 5.0.x
Choose a base branch
from

Conversation

elcreator
Copy link

Hello!

  • Type: new feature
  • Link to issue:

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR

Small description of change:

Phalcon is flexible so code generator should be too - i.e. I want PSR compatible Controllers, Views, Models instead of controllers, view, models and someone my name them i.e. Ctrl, View, Model.

Also optional routes addition file may be beneficial (if user place desired Routes.php in their templates dir).

I.e. I prefer to see all routes related to the feature (module) and who is intended to use them in one place rather than disseminated in docblocks.

class Routes extends \BaseRoutes
{
    protected $_prefix = '/profile';

    public function __construct(\Phalcon\Mvc\Router $router, $module)
    {
        parent::__construct($router, $module);
        $this->get('')(['user']);
        $this->get('/me', null, 'me')(['*']);
        $this->post('/search', null, 'search')(['user']);
        $this->post('/email', null, 'email')(['user']);
        $this->post('/password', null, 'password')(['user']);
        $this->post('/fullname', null, 'fullname')(['user']);
    }
}

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant