langaner / phalcon-starter
Starter for Phalcon framework
Requires
- symfony/debug: 2.7.*@dev
This package is not auto-updated.
Last update: 2024-12-17 17:26:38 UTC
README
A Skeleton project.
How to install
Run composer create-project langaner/phalcon-starter project-directory --prefer-source
or download zip.
Folders
Api and Backend - modules. You can identify modules in module config
Controllers - all your app controllers
Models - models folder
Presenters - presenters. You can use it by call it from model $this->userRepository->getModel()->getPresenter()->test
Repositories - all repositoreis. You can use it by call $this->userRepository->test()
Services - all app services. You can use it by call $this->userService->test()
routes - all routes
Bindings
To use repositories, services, presenters you must register binding in ModulesProvider or in you module.
Examples:
Repository - $this->bindRepository('userRepository', UserRepository::class, [new UserModel]);
Service - $this->bindService('userService', UserService::class, [$this->getDi()->get('userRepository')]);
Presenter - $this->bindRepository('userPresenter', UserPresenter::class, [new UserModel]);