Latest Articles

PHP Laravel 5 - Get User Agent Value from Request

In this article, i am going to show you how to get user agent from user request in laravel 5.4 application. PHP Laravel framework did several update from their other version. we will see how we can get user agent value from request object. Laravel 5 introduce Request object that provide user request details. So, let's see bellow two way to get user agent value form laravel 5 application. <strong.....

Posted On June 17, 2017

Laravel 5 Passport - Key path oauth-public.key does not exist or is not readable solved.

When i was working with laravel passport in my application. In my local system works, but when i upload it to git and my friend pull and run project he got it error as following : <strong>Key path "file://F:\xampp\htdocs\blog\storage\oauth-public.key" does not exist or is not readable</strong> I was thinking, what is issue because i already installed successfully laravel passport. But i finally i.....

Posted On May 20, 2017

How to send json response from controller in codeigniter ?

In this article, we will learn how to send json response from controller method in codeigniter application. When we work with jquery ajax at that time we need to manage using json. If you got error then it will return json array with error. So You can simple send json response from controller function in codeigniter application by following example: Let's see example as bellow: <strong class="ste.....

Posted On May 20, 2017

Laravel 5 - Change JSON response to request with wrong api token.

If you used laravel 5 passport then i am sure you require to use "auth:api" middleware, But you can see when you pass wrong api token then you just get "unauthenticated" json response with error key. If you want to change message or json formate then you can do it. You have to on on default Exceptions handler file and you can change there. So just open your Handler.php file and change json respo.....

Posted On May 17, 2017

Laravel autocomplete typeahead search example from scratch

In this article, i will show you how to create jquery ajax autocomplete using typeahead js plugin in Laravel 5 application. If you have thousands of data in database table and you require to display in drop-down or something like to choose that data. So If you use drop-down it load and it's hard to find specific record. So At that time you can simply use jquery autocomplete in your application. I.....

Posted On May 10, 2017