This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Contracts\Auth\Guard; | |
use Illuminate\Contracts\Cache\Repository; | |
class Cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App\Support; | |
trait NullingTrait | |
{ | |
/** | |
* Boot the trait. Adds an observer class for nulling. | |
* | |
* @return void | |
*/ | |
public static function bootNullingTrait() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
var host = window.location.hostname.substring(0, window.location.hostname.indexOf('.')); | |
var newHost = window.location.port == "8000" ? host + '.com' : host + '.app:8000'; | |
window.location.href = 'http://' + newHost + window.location.pathname; | |
}()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class TestCase extends Illuminate\Foundation\Testing\TestCase { | |
/** | |
* Creates the appliation. | |
* | |
* @return \Symfony\Component\HttpKernel\HttpKernelInterface | |
*/ | |
public function createApplication() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function routeClass() | |
{ | |
$routeArray = Str::parseCallback(Route::currentRouteAction(), null); | |
if (last($routeArray) != null) { | |
// Remove 'controller' from the controller name. | |
$controller = str_replace('Controller', '', class_basename(head($routeArray))); |