loading...
Cover image for Build A Simple Blog Using PHP and Laravel (Beginner's Guide)

Build A Simple Blog Using PHP and Laravel (Beginner's Guide)

ericnanhu profile image Eric Hu Updated on ・3 min read

Laravel Tutorial (2 Part Series)

1) Build A Simple Blog Using PHP and Laravel (Beginner's Guide) 2) Some Useful Tools For Web Development (PHP)

Hey guys! I've completed my first tutorial on PHP and Laravel. I this tutotial, we'll go through the basics of the Laravel framework by building a simple blogging system. Note that this tutorial is only for beginners who are interested in web developing but don't know where to start. If you are an experienced coder, it will be very boring for you. Check it out if you are interested: Laravel Tutorial For Beginners

Demo

Here is a demo site I’ve built: http://laravel.demo.techjblog.com/

Login Information

email: demo@demo.com

password: demo

Getting Started

img

Let’s start by making some preparations, install the necessary software, create a new Laravel project, and then, we need to talk about the MVC structure, which is commonly used by most of the web frameworks.

Some Useful Tools For Web Developing (PHP)

Laravel Tutorial #1: Setup the Project

Laravel Tutorial #2: Routes, Views, Controllers and Models

Database

Designing Database Solutions for SQL Server 2016

One of the most important steps of web developing is to design the database structure. In this tutorial, we’ll make four database tables together.

The users table stores the user name, email and password. The migration file for this table is already included in Laravel. The categories and tags tables store the category names and tag names. And finally, the posts table stores the post title, content, post image and so on.

Laravel Tutorial #3: Database Structure

However, just creating the tables is not enough. The tables have relationships between each other. The part could be a little tough for beginners, I will try to make it easy to understand, and only introduce four most basic relationships.

Laravel Tutorial #4: Relationships

Admin Panel

img

Every website requires an admin panel where you can update new content to your site, and in this tutorial, I will use Voyager as an example.

Laravel Tutorial #5: Admin Panel (Voyager)

However, the problem with open-source projects is that you could lose the community’s support anytime, and it is not as secure as commercial panels. So, if you are interested, Nova is also an excellent choice. But unfortunately, it is not free.

Laravel Nova: The Perfect Admin Panel For Your Laravel Apps

Routes, Controllers and Views

The following two articles are the core components of this tutorial.

Routes are the entry points when someone visits your blog. They receive URLs and returns controllers. Controllers retrieve data from the database through models and put them in views.

Laravel Tutorial #6: Routes and Controllers

Views are what we actually see in the browser, so they do look like HTML and CSS. However, things are more complicated than that.

Laravel Tutorial #7: Views

Deploy

Now we can finally deploy our site.

Laravel Tutorial #8: Deploy

Digging Deeper

14 Bootstrap Search Bar Box Design Examples - OnAirCode

If you are interested in developing more functions for your blog, check out this post.

Laravel Tutorial #9: Search, Pagination, Related Posts and Other Functions

Laravel Tutorial (2 Part Series)

1) Build A Simple Blog Using PHP and Laravel (Beginner's Guide) 2) Some Useful Tools For Web Development (PHP)

Posted on by:

Discussion

markdown guide
 

Would you consider a more inclusive intro than the term "guys"? Folks, y'all, everyone are a few substitutions that could work.