The Blog Tutorial
It’s finally time to write our first full application. If you haven’t read the other chapters you
might find this a little tricky. Let’s have a look at what we are going to be using to create the
• Blade Templates
Let’s have a look at the plan Stan, and see exactly what we are going to be building.
Oh yeah, if you would like to see what we are making then you will find the source code for this
tutorial on github¹.
15.1 The Design
We are going to build a three page blog. The first page will consist of a listing of blog posts.
Similar to the front of a Wordpre.. Wordpush blog. The next page will be the full-view page.
It is the page you reach when you click an article that you want to read. The final page will be
the page where we write our posts.
Normally you would have the ability to edit or delete posts, but we can add all that stuff later.
I’m not counting the usual login page in that count, since it is used with any application that
Let’s think about the database schema for a moment. We know that we are going to need a table
to store our blog posts. We will also need a table to store our users. We are also going to need
some form of relationship between them both. Let’s map this out and think about the fields.
Table : posts
updated_at DATETIMETable : users
Ok that looks good. We can use the author_id field on the Post object to reference the User
object, which represents the post’s author.
Right, to work!