Created
July 26, 2016 14:20
-
-
Save nerdo/964c0bf9662db99a4691bf9c6ab8729c to your computer and use it in GitHub Desktop.
This file contains 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 | |
// 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