{"id":24095853,"url":"https://github.com/becodeorg/verou-5-mvc-xzanderzone","last_synced_at":"2025-09-11T05:15:52.596Z","repository":{"id":218040321,"uuid":"744913546","full_name":"becodeorg/verou-5-mvc-Xzanderzone","owner":"becodeorg","description":"verou-5-mvc-Xzanderzone created by GitHub Classroom","archived":false,"fork":false,"pushed_at":"2024-01-22T08:27:21.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-09-04T04:44:11.677Z","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/becodeorg.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":"2024-01-18T09:06:27.000Z","updated_at":"2024-01-19T10:37:02.000Z","dependencies_parsed_at":"2024-01-19T11:59:20.058Z","dependency_job_id":"60adbfff-3036-4662-ae55-ebf576a8548d","html_url":"https://github.com/becodeorg/verou-5-mvc-Xzanderzone","commit_stats":null,"previous_names":["becodeorg/verou-5-mvc-xzanderzone"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/becodeorg/verou-5-mvc-Xzanderzone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becodeorg%2Fverou-5-mvc-Xzanderzone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becodeorg%2Fverou-5-mvc-Xzanderzone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becodeorg%2Fverou-5-mvc-Xzanderzone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becodeorg%2Fverou-5-mvc-Xzanderzone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/becodeorg","download_url":"https://codeload.github.com/becodeorg/verou-5-mvc-Xzanderzone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becodeorg%2Fverou-5-mvc-Xzanderzone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274580447,"owners_count":25311177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-01-10T12:07:19.041Z","updated_at":"2025-09-11T05:15:52.577Z","avatar_url":"https://github.com/becodeorg.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Model, view, controller (also: even more acronyms 🤔)\n\n- Repository: `mvc`\n- Type of Challenge: `Learning`\n- Duration: `2-3 days`\n- Team challenge : `solo`\n\n## The mission\n\nMVC is one of the typical acronyms in programming.\nIt's a structure that will split your project into different files with a clear responsibility for each:\n\n- **Models** are classes that contain data. They usually correspond to a table from your database.\n- **Views** are files that will mostly contain HTML. Any user facing end result will be made here.\n- **Controllers** are classes responsible to control the handling of a request: they will load the right models and provide them to the correct view.\n\n\u003e Why all this hassle? Can't I just get the data I need in the index?\n\u003e The answer is simple: yes, you can\u003csup\u003e`*`\u003c/sup\u003e.\n\n## 🌱 Must-have features\n\n### Step 1: have a look around\nFirst, read the code provided in the [starter pack](./Starter-pack).\nIt's well documented with comments. Try to follow the track of the homepage.\nCan you follow the path to the view?\n\n\u003e Know what you Google for: modal or model? A modal is a popup window, a model is part of the MVC structure. Or your future boy/girlfriend.\n\n### Step 2: preparation\nFor this exercise, you'll need a database with an articles table.\nAdd three fields: \n- title (VARCHAR, 255)\n- description (TEXT)\n- publish_date (DATETIME)\n\nDiscover the writer in yourself and provide some dummy content. (childhood stories allowed)\n\n### Step 3: showtime\nThe homepage from the starter pack works and provides a link to the articles page.\nThe articles \u003e index view contains a nice overview of the articles, but does not have the data.\nFinish all the TODO's in the controller to provide the required info.\n\n## 🌼 Nice to have (doable)\n\n- Provide a detail page to show all content from an article.\n- Add previous/next links to an article detail page.\n- Can you find any info that would make sense to a function in the article model? There's a hint in the spoiler below.\n- An article right now is pretty dry. Make it stand out by adding the related database properties, or upgrading the existing ones. (example: a url to an image)\n\n\u003cdetails\u003e\n    \u003csummary\u003eHint for the article model\u003c/summary\u003e\n\n    The url is a good example of something related to an article that you might need multiple times. Moving this to a function in that model will make possible future changes to it *way* easier. Can you spot in your future code?\n\n\u003c/details\u003e\n\n## 🌳 Nice to have (hard)\n\n- Expand the database and models with an author. Each article should have an author. The article title should be shown in the following format `A guide on building your own rocket - By Elon Musk`.\n- Make a detail page for an author, listing all his/her articles on that page.\n\n\u003e \u003csup\u003e`*`\u003c/sup\u003e This will not prepare you for frameworks however, which make heavy usage of the MVC pattern\u003csup\u003e`**`\u003c/sup\u003e\n\n\u003e \u003csup\u003e`**`\u003c/sup\u003e Alright, then... is there *always* a catch?\n\u003e The answer is simple: yes.\n\nBest of luck!\nI hope you'll be able to end with these famous words:\n\n![](https://media.giphy.com/media/l3vR6aasfs0Ae3qdG/giphy.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecodeorg%2Fverou-5-mvc-xzanderzone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbecodeorg%2Fverou-5-mvc-xzanderzone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecodeorg%2Fverou-5-mvc-xzanderzone/lists"}