Best Way to insert Laravel Brackets to Eloquent Query (And Or Conditions)
Laravel Brackets to Eloquent Query (And Or Conditions) This article will discuss putting brackets to And Or Conditions of laravel eloquent query. Eloquent is a great tool to interact with database via a model. Basically Laravel Models are Eloquent models and you can perform any kind of query in a simple way but sometimes it…
Laravel Database Seeders and Factories (Best Way to Seed Data)
Laravel Database Seeders and Factories
This article will focus on how you can seed the data to your database. Seeding the data means to insert some fake data or some mandatory data on the fresh migration or whatever the situation will be. Typical and most common example will be to add admin to your application to the users table.
Laravel Accessors and Mutators
Laravel Accessors and Mutators Accessors and Mutators are very useful when you are about to change some value before showing it or change the value before saving it. This article will practically demonstrate how Accessors and Mutators works. You can read more about from the Laravel Official Docs What are Accessors and Mutators. Accessors –…
Laravel Model Observers
Laravel Model Observers This article discuss the Laravel Model Observers. Observers help you observe any change on your Eloquent Model, for example you save a record, update a record etc. and Observer will observe that change and you can perform any action upon that change. You can read the official documentation about observers here. For…
Laravel Model Fillable vs Guarded !
Laravel Model Fillable vs Guarded Attributes Fillable and Guarded arrays works the same but are the opposite of each other and this article will discuss exactly what is fillable and guarded. There are three methods to save, update records in Laravel. For example we have a table employees having two fields employee_name and employee_email. In…
Laravel Permissions through Policies
Laravel Permissions through Policies Implementing Permissions in Laravel through Policies This article is about implementing laravel permissions through Policies but I you want to implement permissions by gates then must read the article how to implement permissions through gates and You can read the article Custom implementation of Laravel roles and permissions if you wish…
Custom Laravel Roles and Permissions
In this article you will be reading about how you can build your own custom logic for the roles and permissions in Laravel or any other framework. Although Laravel has Gates and Policies and have some external packages which you can implement for roles and permissions but there are no gates and policies or packages…
What is Laravel ?
What is Laravel ? If you are coming from core PHP or some another language and you want to learn Laravel, the first question in your mind will be what exactly is Laravel ? If you don’t know exactly what is Laravel then you can’t proceed to learn it. so, I am going to explain what…