HDTuto.com

PHP


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

Codeigniter 3 - Order by random records from mysql database example

If you are finding way to how to get random records from mysql table in codeigniter project then you are a right place. You can easily get random rows using codeigniter query builder order_by. here you will see the example of getting random result using order_by in codeigniter 3. In order_by(), we have to pass two argument parameter, one is a column name and another is a 'RANDOM' then codeigniter.....

Posted On July 19, 2018

How to use multiple where condition in Codeigniter?

Hi Guys, Here, i will show you how to write multiple condition in where clause using codeigniter 3 Query Builder class. Codeigniter provide set class function for each mysql function like where clause, join etc. So same for where clause, they provide "$this->db->where($array);", so we can use easily. In this tutorial, you can see two way to add multiple where condition in your codeigniter applica.....

Posted On July 19, 2018

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