Skip to content

Instantly share code, notes, and snippets.

@Jeff-P
Jeff-P / OTF.php
Created December 6, 2018 03:43 — forked from lukevers/OTF.php
Laravel 5 On The Fly Database Connections
<?php namespace App\Database;
use Config;
use DB;
class OTF {
/**
* The name of the database we're connecting to on the fly.
*
@Jeff-P
Jeff-P / laravelAutoCheck.php
Created October 11, 2016 04:19
Laravel 5.3 Auto-check if user is logged in if not refresh page to save page after login
//create new route
Route::get('/checkAuth', function() {
})->middleware('auth');
//add this script to your master layout file
<script>
setInterval(function() {
$.ajax({