Get Laravel Route Parameters in Middleware

This snippet will teach you how to get route parameters in middleware to check for it or do anything else

Fix: [nested] failed to find nested object under path [usersTagsArray]

Sometimes when searching multiple indices at once with one of those indices having a nested rule to be searched against, other indices that don't have this rule, will return an error like this : [nested] failed to find nested object under path [usersTagsArray], Here is the solution for it: inside the nested query it self use the following attribute to ignore it inside unmapped indices : "ignore_unmapped" : true,

From Excel to SQL Query

If you have data in an Excel sheet and would like to create a sql query to add/insert data here is the way,

Login with facebook in laravel using socialite

In this snippet I am going to explain how to login to your system with facebook using laravel socialite package

Integrate paypal to your laravel project

This snippet will teach you how to integrate paypal to your laravel project

Calculate difference in minutes between created at and current time in Laravel

how to Calculate difference in minutes between created_at and current time in Laravel using carbon

disable dates before today in input type date

this snippet will teach you how to disable dates before today in input type date

Laravel Inactivity time setting

When user logged-in and remains inactive , they can be logged out after a period of time . so this snippet will teach you this

create middleware in laravel

this snippet will teach you how to create a middleware for accessing specific routes , for example is to test if admin is logged in or not

orderBy on relationship

Sometimes you will need to order the eloquent results based on a relationship for example posts and categgories. Here are different ways to do so based on this laravel daily video : https://www.youtube.com/watch?v=lRi1-RYnQ7A