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…
Month: October 2022
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 check user agent in angular ?
In this post, we will show you how to check user agent in Angular. user-agent header is a string that contains information about the browser and operating system. It is set by the browser and sent to the server with every request. It can also be used to determine if…
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 on condition and sub queries too. To create where not…
How to use moment js in angular ?
This post covers how to use Moment.js in Angular. We’ll go over why Moment.js is useful, how to install it, and how to use it in Angular to manipulate dates and times. Moment.js is a powerful and flexible library for manipulating dates and times in JavaScript. It has been around…
How to get laravel application root path ?
In this blog post, we’ve shown you how to get 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 you need to get the path to your application’s storage directory, you can use…
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…
Angular ngClass conditional class Example
In this blog post, we’ll explore Angular ngClass conditional class Example in component’s styles based on certain conditions. Sometimes in our application we want dynamically change the color, size, font, background images so Angular provides various ways to conditionally apply classes and style to elements. We’ll discuss how to use…
Laravel multiple orderBy clause with example
In this blog post, we will take a look at how to use the Laravel multiple orderBy clause in the Eloquent ORM. You can order query results by multiple columns using the orderBy method. This is useful when you want to sort by multiple criteria. In this post, we’ll show…
Angular Dynamic Style CSS with Example
In this blog post, we’ll explore Angular dynamic style CSS with example in component’s styles based on certain conditions. Sometimes in our application we want dynamically change the color, size, font, background images so Angular provides various ways to conditionally apply styles to elements. In this post, we’ll explore three…