Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jino Antony jinoantony

🏠
Working from home
View GitHub Profile
@jinoantony
jinoantony / async-vs-sync-benchmark.md
Created Jul 5, 2020
Async vs sync nodejs benchmark result
View async-vs-sync-benchmark.md
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 [#
View api.php
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
View AssignGuard.php
<?php
namespace App\Http\Middleware;
use Closure;
class AssignGuard
{
/**
* Handle an incoming request.
View User.php
<?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
View web.php
<?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!
View AssignGuard.php
<?php
namespace App\Http\Middleware;
use Closure;
use Auth;
class AssignGuard
{
/**
@jinoantony
jinoantony / RedirectIfAuthenticated.php
Created Jun 18, 2018
RedirectIfAuthenticated Middleware
View RedirectIfAuthenticated.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
/**
View SubadminLoginController.php
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class SubadminLoginController extends Controller
{
/*
View AdminLoginController.php
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class AdminLoginController extends Controller
{
/*