If you are Laravel geek and thinking about to build a new blog application then you are on the right place. And let’s learn how we can start building a blog in Laravel. Well, In this article / blog I am going to talk about the structure of blog in Laravel. Not the frontend design. If you are majoring it by reading the design keyword at in front of title.
As you have read the point. Now I want say that there are few technologies or you can say frameworks that we are going to use in this Laravel blog read List.
I love using Livewire if needed and along with some Javascript if needed. And there is alpine.js that I have not used before will consider to use that as well.
Building the structure/Design of Laravel blog.
Create A Flowchart To Design the Blog Structure
Basically a flowchart says what you are going to build. What will be the process and steps in your amazing project. Having a clear vision that what you want to achieve or build is important in everywhere. Whether it is your own project or it’s any client’s project. Having a flowchart is most important things. Well, I just want to say that we have to build the flowchart first of all while we are going to build any kind of application not just in Laravel, it can be any other tech stack as well.
You can draw it on a white paper as well.
What you have to build in flowchart. Listen, you don’t have specific roles so you have to do everything on your own.
Why to create flowchart first
Building a flowchart makes things clear in mind. These are just the basic things that you have to consider while building.
- Define all the steps from login to commenting and registering everything in a flow. See the image below.
- Be real and define everything in squence
- Think what you can add to flowchart so that will make some more impact.
Build Database Structure
Now, you have clear process that what you have to build in your blog and now you can define that which modules you have to build first and this is how you can create a good working process in your project (blog) and for them which module needs more focus. That means, for example you should think it as a expandable project. Maybe you want to add some more functionality or stuff in this blog after few months. So, it should be expand able.
For scalable projects having a good database structure is much important. If you are not a database guy take advice from who is already there. Don’t just rush. If this is something that is representing your business then it’s not just a blog it’s a big thing which is getting leads for you. Well, building a good database structure is important as well as other things.
Schedule Tasks And Time Limit
This is the important thing as I have implemented and saw that when we are into any kind of process then we work with more productive manner when we do have time limits. I don’t know why whether it is the fear of time limit or something else. But it works. If you have decided to build this application in under one month. Then you should schedule your tasks and should create tasks for every module so that you will be writing module one by one and building them faster. This is all about scheduling tasks, but it works.
Write Scalable Code
By scalable I mean use DRY method. Well, I am a PHP developer love writing code using DRY method. If you don’t know what dry is then DRY means ” Don’t Repeat Yourself”. And this is most important thing when it comes to coding. You can write scalable code easily. It just needs your Clear Thinking. Well, you can have this also when you know that you have clearly defined what you are going to build in your flowchart. Then you can easily think what you need again and again.
Now, OOPs are my favorite subject in PHP. Because this the way we can easily write scalable code.
I hope this blog will help you. If I have wrote something that is not convenient or not useful then don’t forget to ping me. Thanks.