mmaged
4 months ago
484
1
Laravel

Users and Categories have many Services

Posted 4 months ago by mmaged

There is a Users table that has many services, and Categories table that also has many services.

I want to develop an API like this for the services

Route::resource('categories/category_id/services', 'ServiceController');

what is the best way to add a service for the authenticated user and for the received category in the store method in ServiceController?

Please sign in or create an account to participate in this conversation.