Search in Snippets
 

All Projects

Building mini ecommerce in Laravel

Building RESTful APIs in Laravel

Building Mini Issue tracker with Laravel and Vue



All Snippets

changing auto incremeneting field names

Like different table names it is also usually needed for old projects where incrementing field names for a table could...


Working with different table name for a model

If we need to work with a model with different table name which is usually needed for old projects where...


Selecting fields inside eager loading method "with"

Suppose there is a relation Post belongsTo User. If we are retrieving posts with associated user relation, we can use...


Installing laravel debug bar

Laravel debug bar is used to check number of things such as 1. model interaction, 2. number of queries run...


Using withAggregates in Eloquent way

Suppose Post hasMany Rating and there is a field rating in ratings table. For this following snippet can be used...


How to use whereHas to retrieve rows based on existence of relationship

whereHas() method is used to add further query constraints on top of has() method. Suppose,  there is user hasMany relationship...


Selecting rows if they are NULL or NOT NULL

Following snippet will help you to get rows from a table which are either NULL or NOT NULL // rows...


Returning rows where a column is between two values

If we were to get posts between ids of 5 and 8 including both of these values we can use...


How to write multiple AND queries inside OR query using closure

Sometimes it requires to setup eloquent builder to create queries which has multiple ands inside a or query. For example,...


How to disable saving of eloquent timestamps

Basically timestamp saving means storing date data into created_at, modified_at or deleted_at fields in table of laravel database during resource...


mahfooz

Hello, I am Mahfoozur Rahman and LCS is a site where I have been put together all my development experience with laravel in tutorials and step by step manner.

I am also working remotely for clients with development services so that they can achieve their business goals.

If that is what you want, you can contact me on mahfoozur.rahman.bd@gmail.com

I am currently also available for freelance work.

Categories

VS Code Tips and Tricks (2)
Restful API (1)
Coding Assistance (1)
Database Concepts (1)
Schema Design (0)
Data Retrieval (1)
Searching Data (0)
DevOps (1)
Amazon web services (1)
Livewire (1)
Crud (1)
Storage and retrieval (1)
Caching (1)
Frontend (2)
Select dropdown (2)
File Uploads (1)
File Uploads (1)
Vue (2)
Vite Vue (1)
Mixin (1)
Packages (1)
Debugging (1)
Security (1)
Authentication (1)
View (1)
View Composer (1)
Projects (99)
Model Performance (4)
Registration (1)
Login (1)
Restful API (16)
Topic oriented Community (1)
Mini Ecommerce (38)
Mini Blog (2)
Mini Issue tracker (28)
Database tables and data scaffolding (1)
Stripe (1)
Topic oriented user community (6)
Collections (7)
Collection Methods (7)
Sessions (2)
Storing Data (1)
Retrieving Data (1)
Improvements (7)
Laravel Code Snippets (6)
Mini Ecommerce (1)
Definitions (2)
Generating Commands (0)
Eloquent Builder (1)
Resource Controllers (0)
Seeding (1)
Executing Commands (0)
Controller (4)
Resource Controllers (0)
Middleware (4)
My Weeknesses (1)
My Weekness (1)
Eloquent ORM (50)
Eloquent Builder (30)
Seeding (4)
Relationship (6)
Configurations (8)
Accessors (2)
Artisan Console (4)
Executing Commands (4)
Generating Commands (0)