{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":703219606,"defaultBranch":"main","name":"laravel_10_x_back_end_postmen","ownerLogin":"my-ihq-prf","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2023-10-10T20:28:30.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/96097627?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1696969977.0","currentOid":""},"activityList":{"items":[{"before":"3bf45b9f86bdb292861f67e3bc3b4b5bc491456a","after":"5fe7ccb3f529c2d6c382be940d3748458e3ce6f8","ref":"refs/heads/main","pushedAt":"2024-03-06T07:39:19.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"main ✨ commit\n\nIssues:\n\n- improved the general code structure, eliminated potential bugs, and solved a number of issues.\n\n- resolved a problem with the migration process for the article table {full-text} indices' [body, title] and [title, user_id]\n\n- Added the task description into README.md\n\nEnhance:\n\n1. **Refactoring**:\n - **restructuring** existing code without changing its external behavior. It aims to enhance code quality, readability, and maintainability.\n - Reducing complexity, improving code organization, and eliminating technical debt.\n - Implemented certain features, optimizing queries, and adhering to best practices.\n\n2. **Deep Refactoring**:\n\n - **Controller Refactoring**:\n - Concise and focused on handling HTTP requests Controllers.\n - Refactored controllers by ensuring they follow the standard CRUD (Create, Read, Update, Delete) methods for specific models (e.g., `Product`).\n - Each controller have now methods like `index()`, `create()`, `store()`, `show()`, `edit()`, `update()`, and `destroy()`¹.\n\n - **Model Refactoring**:\n - Models represent database tables and encapsulate business logic.\n - All actions related to the database, including intricate queries, relationships, and queries, have been transferred to its model.\n - The queries and data processing functions were organized within the model.\n\n - **Routes Refactoring**:\n - The routes remained uniform across various models.\n - The follow pattern is such that the routes correspond to the methods of the controller.\n - Example routes for a `App\\Http\\Controllers\\Api\\ArticleController`:\n - `api/v1/articles` (GET) - `ArticleController@show`\n - `api/v1/articles` (POST) - `ArticleController@create`\n - `api/v1/articles/{article}` (PUT) - `ArticleController@update`\n - `api/v1/articles/{article}` (DELETE) - `ProductController@delete`\n\n3. **Tools and Practices**:\n - **Pint for Laravel** has been employed to automate the inclusion of early returns and execute various checks while refactoring.\n - In addition, several functionalities of PhpStorm have been utilized to generate code documentation, conduct tests, and make code changes in your source files.","shortMessageHtmlLink":"main ✨ commit"}},{"before":"7c6bf9624f9ec5c628ffb0320c6f58890fc4a479","after":"3bf45b9f86bdb292861f67e3bc3b4b5bc491456a","ref":"refs/heads/main","pushedAt":"2023-10-20T08:45:14.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"main ✨ commit\n\n- reduced the length of the `profile_photo_path` field in the `users` table to 128 characters, as you suggested. I agree that this is an optimal size for storing user profile images and that it will enhance the efficiency of the application.\n\n- added a unique index to the `title` and `user_id` fields in the `articles` table. This allows different users to create articles with identical titles and prevents the same user from duplicating articles. I've also added a full-text index to the `body` and `title` fields to enable keyword search using the MATCH AGAINST operator for MySQL and PostgreSQL.\n\n- formatted the code according to PSR-12 standards, making it cleaner and easier to read.\n\n- applied the REST architectural style to API routes, making them more consistent and understandable. I've also used appropriate HTTP methods (GET, POST, PUT, DELETE) for handling different types of requests.\n\n- replaced the IfOk anti-pattern with the \"Early Exit\" principle, which means immediate exit from a function when an error or incorrect state is detected. I've also used the IfError pattern, which means immediate termination of code execution or transition to an error handling block when an error occurs. This has simplified the code and made it more readable.","shortMessageHtmlLink":"main ✨ commit"}},{"before":"b7d462f36d2f76647c6df626ea4abd4db2b7bf59","after":"7c6bf9624f9ec5c628ffb0320c6f58890fc4a479","ref":"refs/heads/main","pushedAt":"2023-10-20T08:44:16.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"main ✨ commit\n\n- reduced the length of the `profile_photo_path` field in the `users` table to 128 characters, as you suggested. I agree that this is an optimal size for storing user profile images and that it will enhance the efficiency of the application.\n\n- added a unique index to the `title` and `user_id` fields in the `articles` table. This allows different users to create articles with identical titles and prevents the same user from duplicating articles. I've also added a full-text index to the `body` and `title` fields to enable keyword search using the MATCH AGAINST operator for MySQL and PostgreSQL.\n\n- formatted the code according to PSR-12 standards, making it cleaner and easier to read.\n\n- applied the REST architectural style to API routes, making them more consistent and understandable. I've also used appropriate HTTP methods (GET, POST, PUT, DELETE) for handling different types of requests.\n\n- replaced the IfOk anti-pattern with the \"Early Exit\" principle, which means immediate exit from a function when an error or incorrect state is detected. I've also used the IfError pattern, which means immediate termination of code execution or transition to an error handling block when an error occurs. This has simplified the code and made it more readable.","shortMessageHtmlLink":"main ✨ commit"}},{"before":"60ee66d8d22966c4c4e14ce5f7a3078125d11247","after":"b7d462f36d2f76647c6df626ea4abd4db2b7bf59","ref":"refs/heads/main","pushedAt":"2023-10-17T15:56:55.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"Trigger rebuild","shortMessageHtmlLink":"Trigger rebuild"}},{"before":"ed2fe267738165493996f3c6cd17a124b4bbecdf","after":"60ee66d8d22966c4c4e14ce5f7a3078125d11247","ref":"refs/heads/main","pushedAt":"2023-10-17T15:55:35.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"Trigger rebuild","shortMessageHtmlLink":"Trigger rebuild"}},{"before":"13f16804775fa94f2691c5dc5bc47f104cc6aca1","after":"ed2fe267738165493996f3c6cd17a124b4bbecdf","ref":"refs/heads/main","pushedAt":"2023-10-17T15:54:44.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"Trigger rebuild","shortMessageHtmlLink":"Trigger rebuild"}},{"before":"7d26f963149f9d36f244fc0badd66793d12776a8","after":"13f16804775fa94f2691c5dc5bc47f104cc6aca1","ref":"refs/heads/main","pushedAt":"2023-10-17T15:45:19.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"main ✨ home commit","shortMessageHtmlLink":"main ✨ home commit"}},{"before":"5adf721efc4b9a5f8ec8124b031947a8feeba6ea","after":"7d26f963149f9d36f244fc0badd66793d12776a8","ref":"refs/heads/main","pushedAt":"2023-10-16T12:59:39.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"main ✨ home commit","shortMessageHtmlLink":"main ✨ home commit"}},{"before":"6b43a1645ca9708b5e26176afd016fb870f1d414","after":"5adf721efc4b9a5f8ec8124b031947a8feeba6ea","ref":"refs/heads/main","pushedAt":"2023-10-16T09:43:26.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"main ✨ home commit","shortMessageHtmlLink":"main ✨ home commit"}},{"before":"7eed80b9d62a96fc87f668ffb24677f1f67099c0","after":"6b43a1645ca9708b5e26176afd016fb870f1d414","ref":"refs/heads/main","pushedAt":"2023-10-16T09:24:36.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"main ✨ home commit","shortMessageHtmlLink":"main ✨ home commit"}},{"before":"7676890a6f17acb2f6043075a65ef80e44978434","after":"7eed80b9d62a96fc87f668ffb24677f1f67099c0","ref":"refs/heads/main","pushedAt":"2023-10-16T06:51:23.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"main ✨ home commit","shortMessageHtmlLink":"main ✨ home commit"}},{"before":"f8021043f956c18c505bc399c42058bcb270f464","after":"7676890a6f17acb2f6043075a65ef80e44978434","ref":"refs/heads/main","pushedAt":"2023-10-16T06:46:20.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"first commit2","shortMessageHtmlLink":"first commit2"}},{"before":null,"after":"f8021043f956c18c505bc399c42058bcb270f464","ref":"refs/heads/main","pushedAt":"2023-10-10T20:32:57.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"my-ihq-prf","name":"Andrii Antoniuk","path":"/my-ihq-prf","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/96097627?s=80&v=4"},"commit":{"message":"main ✨ home commit","shortMessageHtmlLink":"main ✨ home commit"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"Y3Vyc29yOnYyOpK7MjAyNC0wMy0wNlQwNzozOToxOS4wMDAwMDBazwAAAAQNphyd","startCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wMy0wNlQwNzozOToxOS4wMDAwMDBazwAAAAQNphyd","endCursor":"Y3Vyc29yOnYyOpK7MjAyMy0xMC0xMFQyMDozMjo1Ny4wMDAwMDBazwAAAAOT_pnZ"}},"title":"Activity · my-ihq-prf/laravel_10_x_back_end_postmen"}