Skip to content

Commit 841559d

Browse files
Merge pull request #34
The removal of `Application.php` was canceled
2 parents 45afca1 + ca6b7b3 commit 841559d

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ To get the latest version of `Laravel Route Names`, simply require the project u
1616
composer require dragon-code/laravel-route-names
1717
```
1818

19-
Next, you can now list the routes, for example by calling the `php artisan route:list` command or by using
19+
Next, replace `Illuminate\Foundation\Application` with `DragonCode\LaravelRouteNames\Application` in the `bootstrap/app.php` file.
20+
21+
You can now list the routes, for example by calling the `php artisan route:list` command or by using
2022
the [`dragon-code/pretty-routes`](https://github.com/TheDragonCode/pretty-routes) package.
2123

2224
## Using

src/Application.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace DragonCode\LaravelRouteNames;
4+
5+
use DragonCode\LaravelRouteNames\Providers\RoutingServiceProvider;
6+
use Illuminate\Events\EventServiceProvider;
7+
use Illuminate\Foundation\Application as BaseApplication;
8+
use Illuminate\Log\LogServiceProvider;
9+
10+
class Application extends BaseApplication
11+
{
12+
protected function registerBaseServiceProviders()
13+
{
14+
$this->register(new EventServiceProvider($this));
15+
$this->register(new LogServiceProvider($this));
16+
$this->register(new RoutingServiceProvider($this));
17+
}
18+
}

0 commit comments

Comments
 (0)