Closed hosseinjarrahi closed 4 years ago
at the moment.. categories are same for all models.. with that in mind, you can easily use: Category::all();
and for categories attached to a single entity, for example a post: $post->categoriesList();
refer to documentation
how we can get all categories from a model , like below : $cats = Post::categories()