HDTuto.com

Latest Articles


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

PHP - How to get last day of the current, next and previous month?

I remember, when I was working on my core php project and it was something on timetable related project and I require to get last day of current month, get last day of next month and also require to get last month of the previous month. It was easy to find a way to get last day of because of php. so I did that and we also get last day of the specific month too by add date. We can do it using date.....

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

How to call function on page load in Vue JS?

If you are finding way to run function when page load then, this tutorial will help to do that. sometimes you may require to write some code or function code on vue js and you must require to load when your page is load. so we can do it using created parameter in vue js. So let's just see bellow full example code. <strong>index.html</strong> <pre> <!DOCTYPE html> <html> <head> .....

Posted On June 24, 2018