Completed
Push — master ( 816440...cac82f )
by Vladimir
12:37
created

RouteServiceProvider::map()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 9
ccs 0
cts 6
cp 0
crap 2
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Foundation\Providers;
6
7
use Illuminate\Support\Facades\Route;
8
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as BaseRouteServiceProvider;
9
10
class RouteServiceProvider extends BaseRouteServiceProvider
11
{
12
    protected $namespace = 'FondBot\Foundation';
13
14
    public function map()
15
    {
16
        Route::get('/', 'FondBot\Foundation\Controller@index');
17
18
        Route::group(['middleware' => 'fondbot.webhook'], function () {
19
            Route::get('webhook/{channel}', 'FondBot\Foundation\Controller@webhook')->name('fondbot.webhook');
20
            Route::post('webhook/{channel}', 'FondBot\Foundation\Controller@webhook')->name('fondbot.webhook');
21
        });
22
    }
23
}
24