Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nerdo/964c0bf9662db99a4691bf9c6ab8729c to your computer and use it in GitHub Desktop.
Save nerdo/964c0bf9662db99a4691bf9c6ab8729c to your computer and use it in GitHub Desktop.
<?php
// Foundation\Application.php
/**
* Base application created for the purpose of setting up a custom router in L5, per
* https://laracasts.com/discuss/channels/general-discussion/can-i-find-the-way-to-extend-router-or-replace-customer-router-class-on-laravel5
*/
namespace App\Foundation;
use App\Providers\RoutingServiceProvider; // your custom RoutingServiceProvider
use Illuminate\Events\EventServiceProvider;
use Illuminate\Foundation\Application as LaravelApplication;
class Application extends LaravelApplication {
/**
* Register all of the base service providers.
* @return void
*/
protected function registerBaseServiceProviders() {
$this->register(new EventServiceProvider($this));
$this->register(new RoutingServiceProvider($this));
}
}
// bootstrap/app.php
// $app = new Illuminate\Foundation\Application(
$app = new App\Foundation\Application(
realpath(__DIR__.'/../')
);
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment