HDTuto.com

Laravel


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

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 - How to generate secure https URL from route?

https is a secure url and we know google give first priority to search that use https. So if you have using http only from scratch and if you install ssl certificate then your website will open with https. So, As we know, If you open with http url then all the links of page will generate with http from route. But if you want to force generate https link from route then you can do it. you can gen.....

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

How to create multiple authentication in Laravel 5.6?

Hi developer, In this article, i will let you know how to create multi auth using guard in laravel 5.6. here i will give you step by step tutorial for multiple authentication in Laravel 5.6 application. Multiple authentication is very important in big application of laravel 5.6. If you work on large web application then you mostly prefer to different tables, like you always prefer "users" table f.....

Posted On July 28, 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 - Delete all records from table query

Do you require to delete all data from table using laravel eloquent? If yes then you can get a solution for your problem. We can easily remove all records from table using DB class with delete(). But if you need to destroy all records using laravel eloquent model then how you will do it?, Actually i cache my all records and when someone remove that records then automatic remove from cache too. b.....

Posted On July 5, 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