Skip to content

Instantly share code, notes, and snippets.

View jinoantony's full-sized avatar
🏠
Working from home

Jino Antony jinoantony

🏠
Working from home
View GitHub Profile
@jinoantony
jinoantony / async-vs-sync-benchmark.md
Created July 5, 2020 07:56
Async vs sync nodejs benchmark result
Metrics sync async
Concurrency Level 20 20
Time taken for tests: 23.247 seconds 10.141 seconds
Complete requests: 250 250
Failed requests: 0 0
Keep-Alive requests: 250 250
Total transferred: 66250 bytes 66250 bytes
HTML transferred: 15000 bytes 15000 bytes
Requests per second: 10.75 [#
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
<?php
namespace App\Http\Middleware;
use Closure;
class AssignGuard
{
/**
* Handle an incoming request.
<?php
namespace App;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements JWTSubject
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
<?php
namespace App\Http\Middleware;
use Closure;
use Auth;
class AssignGuard
{
/**
@jinoantony
jinoantony / RedirectIfAuthenticated.php
Created June 18, 2018 06:56
RedirectIfAuthenticated Middleware
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
/**
@jinoantony
jinoantony / SubadminLoginController.php
Created June 18, 2018 06:46
SubadminLoginController
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class SubadminLoginController extends Controller
{
/*
@jinoantony
jinoantony / AdminLoginController.php
Created June 18, 2018 06:41
AdminLoginController
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class AdminLoginController extends Controller
{
/*