Support the ongoing development of Laravel.io →
Configuration Database
Last updated 2 years ago.
0

As a minimum, I suggest create a posts table and use comma separated fields for tags and categories, and blob for the content, and offcourse the datetime, slug and anything else specific to your site.

Last updated 2 years ago.
0

I mostly agree with @rashidshafique above, but I would suggest a text column.

As for markdown, looks like someone has already written a service provider to 4.x:

You should be able to composer install that and have access to it in your controllers / views where needed.

Last updated 2 years ago.
0

much appreciated for the response's. Could you elaborate on the "table and use comma separated fields for tags and categories" i was thinking of a separate tags table with a relationship?

Last updated 2 years ago.
0

I would separate it out and create a 1 to many relationship between posts and categories and a many to many relationship between posts and tags. So you would end up with 4 tables: posts, categories, tags and post_tags.

Check out: http://laravel.com/docs/eloquent#relationships - (note the post_tags linker table is by default derived from the posts model and the tags model in alphabetical order).

http://packalyst.com has some markdown packages.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.