Today, i am going to show you how to authenticate user node js using JWT and socket io in Laravel 5.3. It is very very important because if you are working with chat application or messengers system etc with user then you have to use JWT token because it is very safe and secure way.
If we work on chat module with socket io but someone can easily hack our code. At that time we require to check given JWT token is valid or not using <strong class="path">socketio-jwt</strong> package of Node.
socketio-jwt package thorough we can simply authentication with user and identify that token is valid .....
When i was working on my PHP project since last 1 year on my current system and phpmyadmin was working very well. but one day i was working on my prjects and electricity off suddenly and when electricity on, i start my system again and open localhost/phpmyadmin, then i found following error:
<pre>Connection for controluser as defined in your configuration failed.</pre>
I did try lot to solve. i also reboot my ubuntu 14.04 system again but i found still that issue. i was very disappointed from this issue. But when i open my PHP Laravel framework project i found bellow issue:
If you are work on laravel 5 application and you require to get user agent(user agent mean user browser details like firefox, cherome etc) then you can get easy. you don't need to use $_SERVER variable like native PHP, but laravel 5 provide Request facade. you can fetch easy using following example:
<pre class="prettyprint lang-php">
public function ImpressionCount(Request $request)
$impre['useragent'] = $request->server('HTTP_USER_AGENT');
$input['ip'] = $request->ip();