{"id":18929720,"url":"https://github.com/thecodingmachine/mouf-tests","last_synced_at":"2026-02-22T23:03:55.326Z","repository":{"id":66284958,"uuid":"71232017","full_name":"thecodingmachine/mouf-tests","owner":"thecodingmachine","description":"Test your mouf skills !","archived":false,"fork":false,"pushed_at":"2017-06-26T05:02:36.000Z","size":268,"stargazers_count":0,"open_issues_count":2,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-20T06:24:52.045Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecodingmachine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-18T09:32:10.000Z","updated_at":"2016-10-18T09:36:22.000Z","dependencies_parsed_at":"2023-05-04T11:01:02.031Z","dependency_job_id":null,"html_url":"https://github.com/thecodingmachine/mouf-tests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thecodingmachine/mouf-tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fmouf-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fmouf-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fmouf-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fmouf-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodingmachine","download_url":"https://codeload.github.com/thecodingmachine/mouf-tests/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fmouf-tests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29730246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T11:34:38.665Z","updated_at":"2026-02-22T23:03:55.305Z","avatar_url":"https://github.com/thecodingmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CRUD Test on Mouf\n\nHi there! If you are reading these lines, it surely means we are close to count you among TheCodingMachine's developper team.\n\nAs we surely said already before, we work alot with our HomeBrewed Framework called [Mouf](http://mouf-php.com/). Therefore here is a simple CRUD (CReate Read Update Delete) test about cars (I know, we could have found a  more funny example :))\n\n## Requirements\nYou will need PHP 7, Apache 2.4, and MySQL installed to proceed.\n\n## Skills\nTo achieve this test, you will need basic skills in :\n\n* Git\n* PHP\n* Javascript (Angular of JQuery)\n\nMoreover, which is quite important to us, you will also need to e skilled in discovering and learning Mouf. No worries, there is plenty of documentation to help you install the framework, and to teach you how to use the 2 main packages required to code this example : \n* **install mouf:** [http://mouf-php.com/packages/mouf/mouf/doc/installing_mouf.md](http://mouf-php.com/packages/mouf/mouf/doc/installing_mouf.md)\n*  **Using the MVC package (Splash):** [http://mouf-php.com/packages/mouf/mvc.splash/version/8.0-dev/README.md](http://mouf-php.com/packages/mouf/mvc.splash/version/8.0-dev/README.md)\n*  **Using our awsome ORM (TDBM):** [http://mouf-php.com/packages/mouf/database.tdbm/version/4.1.5.0/README.md](http://mouf-php.com/packages/mouf/database.tdbm/version/4.1.5.0/README.md)\n*  **Manage weblibraries in Mouf:** [http://mouf-php.com/packages/mouf/html.utils.weblibrarymanager/README.md](http://mouf-php.com/packages/mouf/html.utils.weblibrarymanager/README.md)\n\n## Install the test project\nPlease fork this repository : [http://git.thecodingmachine.com/tcm-projects/mouf-test.git](https://github.com/thecodingmachine/mouf-tests.git) in fact, you may have done thas already as you are reading this project's README file :).\n\nCreate a database for your project (we'll assume you named it 'test_mouf'). Then run the following SQL statements against the database :\n```sql\nCREATE TABLE `brands` (\n  `id` int(11) NOT NULL,\n  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,\n  `logo` varchar(255) COLLATE utf8_unicode_ci NOT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;\n\nCREATE TABLE `cars` (\n  `id` int(11) NOT NULL,\n  `brand_id` int(11) NOT NULL,\n  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,\n  `max_speed` int(11) NOT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;\n\nALTER TABLE `brands`\n  ADD PRIMARY KEY (`id`);\n\nALTER TABLE `cars`\n  ADD PRIMARY KEY (`id`),\n  ADD KEY `brand_id` (`brand_id`);\n\n\nALTER TABLE `brands`\n  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;\n--\n-- AUTO_INCREMENT for table `cars`\n--\nALTER TABLE `cars`\n  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;\n\nALTER TABLE `cars`\n  ADD CONSTRAINT `cars_ibfk_1` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`);\n\nINSERT INTO `brands` VALUES('1', 'Tata', 'logo0.png');\nINSERT INTO `brands` VALUES('2', 'Porsche', 'logo1.png');\nINSERT INTO `brands` VALUES('3', 'Audi', 'logo2.png');\n```\n\nIn order to complete the installation of Mouf, you will have to enter the configuration settings (DB_*):\n\n* **DB_HOST**: should be localhost\n* **DB_PORT**: leave empty for MySQL default port\n* **DB_NAME**: the name of the database (test_mouf)\n* **DB_USERNAME**: your mysql user name\n* **DB_PASSWORD**: your mysql password\n\nPlease follow Mouf's installation steps (have a look at the documentation link aove). Once done, the /vendor/mouf/mouf page should show no errors:\n![Mouf](https://raw.githubusercontent.com/thecodingmachine/mouf-tests/master/img/mouf-no-error.png)\n\nAlso, if you take a look to the project's files, you will see, among others, the following files:\n\n* src *your php classes are here*\n  * MoufTest *root namespace for the project* \n    * Controllers *controllers should be placed here*\n      * RootController.php\n    * Model *Your model*\n      * Bean *Reflect the Table rows*\n      * Dao *perform requests to the DB*\n* views *store the VIEWS called by your Controllers*\n  * root\n    * index.twig *the view called to display the Splash welcome screen*\n\nYou shoud see the Splash welcome page on your application's ROOT url (ex: http://localhost/mouf-test/) :\n![Splash](https://raw.githubusercontent.com/thecodingmachine/mouf-tests/master/img/splash-welcome.png)\n\nIf you have gone so far and everything is ok, it means you are ready to code, congratulations !\n\n## What you should achieve\nBasically, we want ou to implement 2 screens :\n* Cars list : a paginated and filterable list of cars. A car may be removed from that list\n* Car form : add or update a car. Some controls are applied on the form\n\n### Car list\n![list](https://raw.githubusercontent.com/thecodingmachine/mouf-tests/master/img/list.png)\n\n### Car form\n![form](https://raw.githubusercontent.com/thecodingmachine/mouf-tests/master/img/form.png)\n\nThese screens should be coded in a NEW controller called CarController please do not use the existing ```RootController```. Most likelly you will need to code JavaScript. Please create a dedicated JS file in ```src/public/js``` and add it to the template using the *WebLibraryManager* (see documentation link above).\n\nIf you have any troubles installing the project, or any other question, please feel free to contact us at rh@thecodingmachine.com, for a quick response please contact Kevin - kevin.nguyen.tcm or Xavier - x.huberty on skype !\n\nAt the end, please do not open a pull request.\n\nSend us an email with your fork name (most of the time, it's your login) and the branch name.\nThen we can test your code by checkouting the branch. \n\nHappy Coding !\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fmouf-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodingmachine%2Fmouf-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fmouf-tests/lists"}