I am very new to laravel 5 and PHP namespaces. I am creating an API for a website. This API will connect with other API's and create a connection with DB server.
I would like to create effective namespaces for the following structure:
Models:
Base.php, Category.php, Order.php, Product.php
Controllers:
OrderController.php, CategoyController.php,OrderController.php,ProductController.php
Base.php will call other API's.
Category.php, Order.php & Product.php will do all the operations on category, order and product table.
While all controllers will handle the request from the routes, call their respective models or other models(if required) and returns the output in JSON form.
If you require more information, please comment.
Thanks
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire