Latest Articles

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

Laravel check if ajax request or not example

In this article, i will share with you how to check request is ajax on not in laravel 5 application. We maybe need to determine if request is ajax then response should be in json and id using http request then return view. So at that time need to determine request. In this example you will lean how to check if request is ajax or not. Laravel provide ajax() method of Request Facade to identify re.....

Posted On May 8, 2017