Latest Articles

How to return response text/html from controller in laravel 5?

Few days ago, i was working on my new project and project was migrate project php into laravel. I need to migrate apis, So in old php application it returns response as text and i have to keep same response in laravel 5.4 application. So i thought how we can do it, finally i got it, we can do it using response(). response() helper will help to return simple text. So in my php it was like as bello.....

Posted On July 4, 2017

How to get all tables lists of database in Laravel 5 ?

Here, we fetch all tables names with prefix from database using laravel DB facade. So if you require to get all tables then you are at right place. As we can get simply all table lists by following sql query: <pre> SHOW TABLES </pre> In Laravel 5 application we will use same above query by using laravel DB select method. So let's see bellow example: <strong>Example:</strong> <pre> $tables = \DB.....

Posted On July 3, 2017

How to convert image into base64 string jQuery?

Sometime, We may need to convert image object into base64 string using javascript. base64 is easy to store directly to database and simply use it. So in this example i will let you know how to convert your selected image or file into base64 string. Here, bellow see full example of convert selected image into base64 string. So let's see bellow example. <strong>Example:</strong> <pre> <!DOCTYPE .....

Posted On June 28, 2017

How to get all dates between two dates in PHP Carbon ?

Few days ago i was working on my laravel web application and i need to retrieve all dates between date range. I had two days and i need to get all date between those two dates. I tried to search on google and finally i found solution using php carbon and it's perfect fit for my laravel app. So i simply done by write code on like as bellow code, I added my two dates on carbon object and then call .....

Posted On June 27, 2017

Laravel 5 - Populate select box from database example

we always require to generate dynamic select box from database table like if you have users table and you require to generate drop down box on all users from database. So in this article i will let you know how to populate drop down list from database. In this example, i simply created users table and added some dummy data. Then i will populate select box using laravel model. So let's see bellow .....

Posted On June 25, 2017