Orm and Form components for both CI3 and CI4 |
This are a set of components i have developed to assist me in developing in php projects. you might find the useful to you.
POWERORM The ORM Component does the following:
Create and author model which represents the author database table PHP Code: use Eddmash\PowerOrm\Model\Model; Migrations See integration on how to access the command line tools from the choosen framework. In CI4 once integrated, you have access to powerorm:pmanager from ci.php script run Code: php ci.php powerorm:pmanager makemigrations // generate the database agonistic migration file The run Code: php ci.php powerorm:pmanager migrate // creates the actual tables represented by the model on the database Querying:: Code: Author::objects->get(['pk'=>1]) // retrieves the user id primary key of 1 POWERFORM The [/url][url=http://powerorm.readthedocs.io/en/master/form/form.html]Form Component does the following:
PHP Code: use Eddmash\PowerOrm\Form\Form; Simple usage in the controller : PHP Code: if ('post' == $this->request->getMethod()): Usage in the view: To display the form all the is to echo the form object returned to the view as shown below. see rendering form PHP Code: form method="post" novalidate> For any kind of usage assitance please post here https://groups.google.com/forum/#!forum/powerorm-users For issues please post in respective Repos:: https://github.com/eddmash/powerorm https://github.com/eddmash/powerform https://github.com/eddmash/powerormfaker
Hi,
actually I am try to test powerorm with CI4, but I facing with issues. would you help me with the Config\Powerorm definitions? from your documentation, how to add service: Add this method to the Service class at application/Config/Services.php: /** * @param bool $getShared * @return \Eddmash\PowerOrm\BaseOrm */ public static function orm($getShared = true) { if ($getShared): return self::getSharedInstance('orm'); endif; return \Eddmash\PowerOrm\Loader::webRun(\Config\Powerorm::asArray()); } it refers to \Config\powerorm which is missing. thank you in advance, Regards, Redax |
Welcome Guest, Not a member yet? Register Sign In |