Sometimes in our application we want to Get Current Url in Blade file Laravel because we want to add specific conditions to show the data on behalf of current url. It can be complete url, route name and query params…

Collection Count and Check Empty Eloquent Collection in Laravel
In this article we will learn collection count and detect or check empty eloquent collection in laravel. Laravel collection is used to simplify the operations of array. Illuminate\Support\Collection library is used to handle the collection and arrays in laravel. Laravel…

How to use laravel whereNotIn query with example ?
In this guide we will learn to create SQL not in query using laravel whereIn eloquent builder. whereNotIn laravel can used multiple ways to build the query one the of the feature of laravel eloquent is creating dynamic query based…

How to get laravel application root path ?
In this blog post, we’ve shown you how to get the path to your Laravel application root path directory. If you need to get the path from anywhere in your application, you can use the Laravel public_path() helper function. If…

How to get random rows in laravel example ?
In this blog post, we’ll take a look at how to get random rows in Laravel database. We’ll explore the use of the QueryBuilder, Eloquent, and the DB facade. laravel has inbuilt eloquent method to get the random records from…

Laravel multiple orderBy clause with example
In this blog post, we will take a look at how to use the multiple orderBy clause in the Laravel Eloquent ORM. You can order query results by multiple columns using the orderBy method. This is useful when you want…

Laravel orderBy clause in eloquent with example
In this blog post, we will take a look at how to use the orderBy clause in the Laravel Eloquent ORM.Laravel provides an expressive, fluent interface for creating and retrieving records in your database. When we work with databases in…

Laravel whereHas in eloquent Model Example
In this blog post, we’ll take a look at Laravel whereHas in eloquent Model Example and advantages. whereHas method is an important part of the Eloquent ORM. It allows you to add a constraint to a relationship query. whereHas method…

How to drop foreign key in laravel migration ?
Drop foreign key to existing table are easy as creating a foreign key and adding columns to it. In laravel migration we can drop foreign key in laravel migration to existing table using dropForeign method of migration class. Major difference…

How to get timezone select list in Laravel ?
Hello Developers, In this article i will show you get timezone select list in Laravel. In a timezone based application we need to store the timezone of each client or user so we can show the correct time to them…