Phalcon starter
, (*1)
A Skeleton project., (*2)
How to install
Run composer create-project langaner/phalcon-starter project-directory --prefer-source or download zip., (*3)
Folders
Api and Backend - modules. You can identify modules in module config, (*4)
Controllers - all your app controllers, (*5)
Models - models folder, (*6)
Presenters - presenters. You can use it by call it from model $this->userRepository->getModel()->getPresenter()->test, (*7)
Repositories - all repositoreis. You can use it by call $this->userRepository->test(), (*8)
Services - all app services. You can use it by call $this->userService->test(), (*9)
routes - all routes, (*10)
Bindings
To use repositories, services, presenters you must register binding in ModulesProvider or in you module., (*11)
Examples:, (*12)
Repository - $this->bindRepository('userRepository', UserRepository::class, [new UserModel]);, (*13)
Service - $this->bindService('userService', UserService::class, [$this->getDi()->get('userRepository')]);, (*14)
Presenter - $this->bindRepository('userPresenter', UserPresenter::class, [new UserModel]);, (*15)