I'm creating a Laravel app and I have controllers with the CRUD methods, but I need to show reports and I'm not sure if I have to create a controller called 'Reports' or I have to put each report function inside the controller:
-
First Option:
- Controllers/ProductController.php
- Functions (Create, Read, Edit, Update, Delete)
- Controllers/CategoryController.php
- Functions (Create, Read, Edit, Update, Delete)
- Controllers/ReportController.php
- Functions (TopProducts, TopCategories)
- Controllers/ProductController.php
-
Second Option:
- Controllers/ProductController.php
- Functions (Create, Read, Edit, Update, Delete, TopProducts)
- Controllers/CategoryController.php
- Functions (Create, Read, Edit, Update, Delete, TopCategories)
- Controllers/ProductController.php
I hope you can tell me a which is the best option or your own alternative. Thanks.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire