HDTuto.com

Laravel


Laravel 5.7 multiple file upload with validation example

In this post, i will show you step by step how to multiple file upload in laravel 5.7 application. we also learn how to add validation with multiple file uploading in laravel 5.7 app. Using this example, you will get idea to upload multiple images with laravel 5.7. We are going from starch so, we will upload multiple file and store on server then after we will store database too. so in this exa.....

Posted On September 20, 2018

PHP Laravel 5 Union query Example

Hi Guys, Are you looking for how to use union in laravel query builder? If yes then you are a right place. Here i will show you example of union query in laravel 5 project. You can simply user union mysql query by using union() of laravel eloquent. Here i write union query for two tables and get both tables data like as bellow query result: <strong>Example:</strong> <pre> $silver = DB::table("pr.....

Posted On September 18, 2018

Calculate age from date of birth in Laravel

Hi Guys, Today, we will learn to calculate age from birthdate in laravel application. we will use carbon to calculate age in laravel. Actually, yesterday i was working on my laravel 5 application and i require to display age from date of birth in laravel project. I thought i need to use date helper function on php. but i found carbon to calculate age in laravel and we don't require to install c.....

Posted On September 11, 2018

Email Verification in laravel 5.7 Example

Are you looking to verify email address setup in laravel 5.7, then you are a right place. In this tutorial i will example how to setup email verification in laravel 5.7. Few days ago laravel introduce new version 5.7, Then provide email verification after registration in new feature of laravel 5.7. Laravel provide auth to create login, registration by default. But if you want to also add email ve.....

Posted On September 11, 2018

Laravel 5.7 get ip address

In this article, I will let you know how to get ip address from a request in laravel 5.7. Sometime we may require to get client ip address from request object in our laravel 5.7 application. If you are use core PHP and you can get from $_SERVER, but laravel framework provide very simple easy way to get client ip address from request. Here, bellow i gave you example how you can get ip address. yo.....

Posted On September 7, 2018

Laravel 5.7 Image Upload with Validation Example

Hi Guys, Today, i will show you how to create simple image upload in laravel 5.7. I write article step by step about image upload in laravel 5.7 version. I also added validation with image upload in laravel 5.7. I added image upload validation like image, mimes, max file upload etc, So you can easily understand and you it simply. In this post, we will create two routes one for get method and ano.....

Posted On September 5, 2018

Laravel 5 Passing Variable to Javascript Example

In this small article, I will let you know how to pass a variable to jquery in laravel. We always require to get data from laravel model eloquent and pass that variable to javascript. We almost require to pass array variable to javascript in laravel like calender, chart, google map etc. So when you require to print php variable in js then you can do it easily. Here, i will simple get all users f.....

Posted On August 18, 2018

Laravel Eloquent - When Case Statement in Select Query Example

In this article, you will learn how to use if else condition in laravel select query using db raw. We require many times to add if condition in laravel eloquent query using when case statement. So, In mysql, if you want to add else if condition then mysql provided when case statement. we can use it same way as we use if else. Actually, I was read laravel documentation and i was trying to run some.....

Posted On August 14, 2018

Laravel Validation required if other field empty example

We know laravel provide several in-built laravel validation like required_if, required_without etc. If you need to add validation rules like required if other field is empty in laravel then you can do it using required_if or required_without. I am going to explain you, If you give profile image uploading in your user profile page then if already added profile image then you do not need to upload .....

Posted On August 13, 2018

How to get last 7 days data in Laravel?

In this post, you will learn how to get last 7 days records in laravel using carbon. we will carbon for select last 7 days data in laravel 5 eloquent query. Actually, i love to share everything related to laravel. whenever i am developing on my laravel application, i note all the small issue that fetch and note solution so i can write small post and someone can sole out his issue too. Currently,.....

Posted On August 8, 2018