Creating a Blog With Laravel and Vue

Posted 4 months ago by applyingawareness

I currently have a Laravel site that uses vue on the frontend. I'm doing routing through Vue, so when someone hits a url, the backend routes to master.blade.php and switches to the right component to match the url.

I'm trying to figure out the best way to approach building a blog into the site so it fits within the current structure. I would like to create the actual posts in Markdown for ease in formatting, and use Parsedown to turn the markdown pages into HTML. The requirements for the blog are this:

  • Don't need a fancy editor, just want an easy way to create the post and object in the database.
  • I would prefer to use markdown to create posts
  • Would work best as a Vue component to integrate into the current site structure

My main question is this:

  • What exactly should I put in the database to represent a blog post? Should I store the markdown text (main content of a post) in the database object?

I'm mostly curious on how to structure the posts in the database if they're going to be Vue components, and the best way to display them so it all loads quickly.

I apologize if this is a little vague, but I haven't done this before and can't find anyone who's build a blog with Vue and Laravel given these requirements - just want to know where to start so I don't screw myself over by doing things the wrong way in the beginning.

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