HDTuto.com

PHP


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

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

How to read and write json file in PHP Laravel?

Hi PHP Dev, do you require to modify or update your json file in laravel 5 application? If yes then i will let you know how to read and write json file in Laravel project. we will create json file and save json data. Actually, i was working on my laravel app and i require to use laravel translation using laravel trans. but i need to use trans with json data. i was thinking how to read and write t.....

Posted On June 11, 2018

PHP Codeigniter 3 - JQuery Ajax Form Validation Example

Hi Guys, Today we will learn how to add ajax form validation in codeigniter using javascript. we will create contact us form and form submit using ajax in codeigniter 3 app. we will use validation library of codeigniter and print error messages using ajax. We will implement server-side validation rules in codeigniter application on form submission using ajax. It is very simple to use ajax valid.....

Posted On June 5, 2018

Laravel 5.6 - Registration Form Validation with Error Messages

In this PHP Laravel 5.6 Tutorial, We will learn how to implement custom signup form validation with error messages from scratch. We will create registration form with "name", "phone", "email", "password", "unique", "min", "max" and "confirm_password" field and I am going to apply validation rules to each input fields of sign up form. So just follow bellow full example: <strong class="step-up">S.....

Posted On June 4, 2018

PHP Laravel 5.6 - Website Scraper using Goutte

In this tutorial, i will let you know how to website scraping in laravel application using Goutte package. i will explain step by step tutorial for web data scraping in laravel 5.6 application. Web scraping, also known as data mining, web harvesting, web data extraction, or screen scraping is a technique in which a program extracts large amounts of data from a website. As we know in the world the.....

Posted On May 25, 2018

PHP Laravel 5.6: Class 'MongoDB\Driver\Manager' not found

In this tutorial, you will find the solution for this issue FatalThrowableError in Client.php line 81: Class 'MongoDB\Driver\Manager' not found, If you also fetch this issue with mongodb using jenssegers/laravel-mongodb composer package then you can solve your issue from here. When you are going to connect MongoDB database with any PHP application then you can face this issue if you don't have P.....

Posted On May 24, 2018