Skip to content

Instantly share code, notes, and snippets.

@medinarodel
medinarodel / ApiAuthMiddleware.php
Created June 17, 2017 15:34
Get Current Routes and List all Routes in Middleware Raw
<?php
namespace App\Http\Middleware;
use Closure;
class ApiAuthMiddleware
{
public function handle($request, Closure $next)
{
# get current Route
return response()->json(\Route::current());
# list all Routes
@medinarodel
medinarodel / mysql-database.yml
Created March 26, 2017 18:10
config/database.yml
test:
adapter: mysql2
encoding: utf8
database: db_test
pool: 5
username: root
password:
development:
adapter: mysql2