In this article we will learn to use aggregate function avg in laravel eloquent and query builder. Laravel itself provide inbuilt method to avg the columns like in MySQL or SQL based database we can do avg of columns using avg aggregate function. Avg method will give you the average…
Category: Php
How to check password with hashed string in laravel 8 ?
Laravel hashed password with bcrypt algorithm is not decryptable and to match the hashed string with plain string we use Hash::check method. For hashing the password laravel use secure Bcrypt and Argon2 hashing for storing user passwords. So in this tutorial i will show you to check password with hashed…
How to create hash password in laravel 8 ?
Laravel provides robust security features and one of them are hash password which is not decryptable. For hashing the password laravel use secure Bcrypt and Argon2 hashing for storing user passwords. Password encrypted with Bcrypt can not be decrypt since it uses key to generate the hashed string and irreversible…
How to encrypt and decrypt string in laravel 8 ?
Laravel provides inbuilt library to encrypt and decrypt the strings. Laravel usage OpenSSL to provide AES-256 encryption which creates long encrypted string. Encryption and decryption is a technique to hide the useful some information in a form which is not readable. In this tutorial i will show you to encrypt…
Laravel min in eloquent query with example
In this article we will learn to use aggregate function min in laravel eloquent and query builder. Laravel itself provide inbuilt method to min the columns like in MySQL or SQL based database we can do min of columns using min aggregate function. Min method will give you the most…
Laravel max in eloquent query with example
In this article we will learn to use aggregate function max in laravel eloquent and query builder. Laravel itself provide inbuilt method to max the columns like in MySQL or SQL based database we can do max of columns using max aggregate function. Laravel eloquent or query builder max method…
Laravel sum in eloquent query with example
In this article we will learn to use aggregate function sum in laravel eloquent and query builder. Laravel itself provide inbuilt method to sum the columns like in MySQL or SQL based database we can do sum of columns using sum aggregate function. Sum method will give you the sum…
How to use laravel having with example ?
MySQL having is used to filter records based on the condition passes but it applies on last of query, where we can access aggregated function of select query. so to create the having query we used having method in laravel. laravel having method accepts multiple parameter same as laravel where….
How to use laravel group by with example ?
MySQL group by is used to group same column value multiple rows into one row so to create the group by query we used groupBy method. laravel groupBy method accepts single and multiple parameter as column name. In this article i will show you to use groupBy in multiple ways,…
How to use Laravel count rows with example ?
MySQL count method gives the total number of rows in executed query, In Laravel we use eloquent or query builder to execute the query. In Laravel eloquent or query builder we use count method to count the rows. We can also count rows after executing the query using get() or…