HDTuto.com

Laravel 5.5


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

Laravel - Vue JS File Upload Example

In this artical, i will let you know how to create file uploading with vue js in laravel 5.6 application. Here you will find step by step tutorial of file upload using vue.js in laravel. Here, we will create one post route for file upload and then create one controller. We will write file upload code on controller method. Then after we will make setup for vue js and write component code. We will .....

Posted On August 4, 2018

Laravel 5.6 - Collection could not be converted to int

Actually, i was working on my laravel 5.6 new project and i require to create dropdown box from database data. I am using laravel "laravelcollective" for select box. I simply created select box with Form::select() element. Then simply i was getting data array using pluck method and i want one black option for just write "Select Form Type", then i simply add following way but i got following error:.....

Posted On July 31, 2018

Laravel 5 Validation Unique With Soft Delete Example

In this article, i will let you know how to make unique validation with soft delete in laravel 5.6 application. Actually, when i was new with soft delete and i require to add unique validation with my email column at that time i fetched this type of issue. At that time i just plane to write manually database query for check unique validation and i done my task. But after some day i was free on Sa.....

Posted On July 24, 2018

PHP Laravel JQuery Form Validation Example

In todays, jquery is a more popular and mostly use in every web application. same as for laravel. So if you are planing to create form validation using jquery in your laravel application then you are a right place. Yes, in this tutorial i will let you know how to create jquery form vvalidation using jquery.validate plugin in your laravel 5.6 application. So, you have to just follow few step and .....

Posted On July 8, 2018

Laravel - Remove Public from URL using htaccess

Are you using shared hosting? then i know you fetch problem with public in your url path. Yes, if you have laravel project and use shared hosting then you go on public folder and then run index.php file. So in your root doamin with public path is not good as for SEO too. So how we can remove public from url in laravel?. Actually i had also problem in my laravel 5.6 application and i need to uploa.....

Posted On July 4, 2018

Laravel - Drop column if exists using migration

it is a very small point for database. as know well for laravel then we always use migration for creating table or add new column in table, also if you need to remove column. but it is good way if you check column if exists or not before drop column in migration. so you can it using schema method. You can see we can use hasColumn(), as you can see below: <pre> Schema::hasColumn(table_name, column.....

Posted On June 24, 2018

Laravel 5.6 - Preview and Crop Image Before Upload using Ajax

A few days ago i was working on my php laravel 5.6 new project. i exactly remember i was working on user profile page and i need to add image upload on my user profile page. but i know image uploading is simple with laravel 5.6, but i also need to add crop and preview image before save image in folder. I was thinking how can i do it easily, i decide to do with my own jquery but after write some c.....

Posted On June 24, 2018

PHP Laravel 5.6 - How to delete multiple row with checkbox using Ajax?

As we know, It's a very important to time consuming task to delete records one by one when there are too many records in the MySQL database table. So in this tutorial i will show you how to remove ro delete multiple rows or records with select checkboxes using jquery ajax in laravel 5.6 application. so basically, in this example, we will create "categories" table and model. Also you need to add s.....

Posted On June 17, 2018