HDTuto.com

PHP


How to insert multiple rows in Codeigniter?

In this tutorial, we will learn how to insert multiple records into a MySQL table using CI's active records library. Sometime, We may require to insert multiple rows instead of single records. It also takes a few time and adds multiple rows in a database table. Codeigniter 3 have an active records library and they provide insert_batch() to create multiple records at a time. So I also added a smal.....

Posted On July 19, 2018

Codeigniter 3 - How to get all routes?

Hello Developer, In this tutorial, i will show you how to get all routes list in codeigniter application. Actually, few days ago i was creating one example on codeigniter 3 project. But when i access route from url it show me 404 not found page. i thought error from index.php or something, but tried that way and nothing happen. Then i plan to get list of all routes and check i created route succ.....

Posted On July 13, 2018

How to remove index.php from url in Codeigniter 3?

Here, I will let you know how to remove inde.php from url using .htaccess in codeigniter project. As we know, codeigniter run index.php and with another route, it's come with index.php file in url. I had same issue on my ubuntu. when i was working on my client project on localhost. i did remove index.php file from url using htaccess file. So, here you have to simply write below code on your .htac.....

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

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