Understanding Laravel’s “hasMany” Relationship

hasmany relationship in laravel

Hi readers, In Laravel we see many ways to manage database relationships using Eloquent. One of the most commonly used relationships is the “hasMany” relationship, which allows you to define a one-to-many relationship between two database tables. In this blog post, we’ll explore the “hasMany” relationship in detail and show you how to use it … Read more

How to Access Relationship Data in Laravel Blade

Access relationship data in laravel

Hi readers, If you’re working with Laravel, you’re likely aware that the framework offers a convenient way to manage relationships between models using Eloquent. But what if you need to access this relationship data in your Blade templates? So, now we are going to learn how can we access relationship data in our blade file. … Read more

DB Transactions In Laravel

db transactions in laravel

Hi readers, If you are new to Laravel or just starting with web development, you might have heard about the term “transactions”. We use transactions in Laravel as an essential concept that is widely used to maintain data consistency. What are Transactions in Laravel? In Laravel, we use Transactions to ensure that the database remains … Read more

How to Use WhereHas In Laravel

wherehas in laravel

Hi readers, I was using WhereHas today in some tasks. So, I decided let’s share what it is. If you’re building a Laravel application that involves working with related models, you’ll likely need to perform queries that filter models based on the existence or properties of related models. One of the most powerful and useful … Read more

How to Add Github Login in Laravel Application

how to add github as social login in laravel

Hi, It’s very easy to add a Github login to your laravel application. Let’s understand how we can do this. So, I’m going to practical example now. Create Github OAuth App Now, you have to go to your GitHub account in your account go to Settings>Developer settings>OAuth Apps, and create your app there. now you … Read more

Building A Rest API With PHP

Building A Rest API With PHP

It’s been a long time since I haven’t written an article but nowadays I’m very much focused on learning new things and upgrading myself. Meantime I got the idea to write about Rest Api so that fellow learners can learn if they don’t know. Before start building a rest API I would love to explain … Read more