The table "Subcategories" is related to the table "Categories" by a one-to-one relationship
This seems to be wrong, I think you should make your relations vice versa:
- Category -> HasMany -> Subcategory
- Subcategory -> BelongsTo -> Category
Table subcategories has column category_id which refers to table category.
After that you'll be able to fetch subcategories of a category:
$category = Category::find(123);
$subcategories = $category->subcategories; // collection
As another option, haven't you considered to have categories and subcategories in one table, with column parent_id referring to the same table? It's more complicated structure, but doable, there are packages implementing it. In your current structure you can't have subcategory of a subcategory (you are bound to only 2 levels of categories).