Are you looking to optimize your web application’s image handling and delivery speed? In the world of web development Image Conversion to WebP in the fly Laravel is key, and one of the ways to achieve faster loading times for images is by using the WebP format. Laravel, a popular…
Category: Laravel 9
How to assign or declare variable in laravel blade template ?
Laravel blade is a powerful templating engine that gives you a lot of control over your HTML. One thing you can declare variable in laravel blade template easily by using different methds. This can be useful if you want to reuse a piece of data in your template, or if…
How to Get Current Url in Blade File Laravel ?
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 too so that we can fetch the data accordingly and…
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 heavily used collections in eloquent query builder to result the…
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 database using the inRandomOrder method. we will understand the random…
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 can be used to filter records based on a relationship….
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 in their region. So in this article i will show…
How to set timezone dynamically and globally in Laravel ?
Laravel stores timezone configurations in config/app.php file and we can easily set timezone dynamically and globally in Laravel. Laravel usage carbon library to get the current date time and format, carbon also respects the timezone defined in config/app.php file. After php 5, php also introduced DateTime class to conduct the…
How to Change Date Format in Blade View File in Laravel ?
Laravel default shows the date in the way its stored in database bu sometimes we want to change date format in blade view file in laravel according to our requirements. It can be multiple possibilities and requirement from client or product manager to change the date format so in this…