HDTuto.com

Latest Articles


How to pass PHP variables in JavaScript or jQuery?

Hi Guys, In this post, we will learn how to access php variable in jquery with small example. We always require to get php array variable or data variable in javascript. If you have simple string value store on php variable and you require to get in jquery then you can do it easily by using echo of php. But if you need to get array variable then you have to do it using json_encode. So, just se.....

Posted On August 20, 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