-
- Downloads
feat: add category localization support and CRUD operations
- Updated the database configuration to use in-memory SQLite for testing. - Renamed `nameTranslation` to `nameTranslationKey` in `Category` model and updated the relation to `TranslationKey`. - Added `CategoryController` methods: `store`, `edit`, and `update` for category management with localization support. - Removed `CategoryRequest.php` and created `CategoryTest.php` for testing new features. - Modified `edit.blade.php` to dynamically set titles and pre-fill form data for category editing. - Updated `phpunit.xml` to use SQLite connection. - Added relation `translations` and method `getTranslation` in `TranslationKey` model for fetching translations. - New routes added for category creation, editing, and updating in `web.php`.
parent
866ce397
No related branches found
No related tags found
Showing
- .env.testing 1 addition, 1 deletion.env.testing
- app/Http/Controllers/Admin/CategoryController.php 82 additions, 0 deletionsapp/Http/Controllers/Admin/CategoryController.php
- app/Http/Requests/CategoryRequest.php 0 additions, 20 deletionsapp/Http/Requests/CategoryRequest.php
- app/Models/Category.php 2 additions, 2 deletionsapp/Models/Category.php
- app/Models/TranslationKey.php 11 additions, 0 deletionsapp/Models/TranslationKey.php
- phpunit.xml 2 additions, 2 deletionsphpunit.xml
- resources/views/admin/categories/edit.blade.php 9 additions, 5 deletionsresources/views/admin/categories/edit.blade.php
- resources/views/admin/categories/index.blade.php 1 addition, 1 deletionresources/views/admin/categories/index.blade.php
- routes/web.php 6 additions, 0 deletionsroutes/web.php
- tests/Feature/CategoryTest.php 96 additions, 0 deletionstests/Feature/CategoryTest.php
tests/Feature/CategoryTest.php
0 → 100644
Please register or sign in to comment