If I understand correctly, what you would probably want instead of a category column in your posts table is a 3rd table that links a post id to a category id. Call it something like "post_categories"
| id | post_id | category_id |
|----|---------|-------------|
| 1 | 23 | 15 |
| 2 | 23 | 11 |
Then you can use Eloquent to link the items together (check out the Many to Many relationship):
http://laravel.com/docs/5.0/eloquent#relationships
Having the cat id's as a string in your post table is going to be a nightmare to manage
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community