-
Notifications
You must be signed in to change notification settings - Fork 6
/
routes.php
43 lines (36 loc) · 1.14 KB
/
routes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* Handle Patterns
*/
$router->get('patterns', 'App\Controllers\PatternsController@first');
$router
->get('patterns/{id}{state?}', 'App\Controllers\PatternsController@show')
->where(['id' => '[\w\-\/]+', 'state' => '~[\w\-]+'])
->name('patterns');
/**
* Handle Templates
*/
$router
->get('templates/{id}{state?}', 'App\Controllers\TemplatesController@show')
->where(['id' => '[\w\-\/]+', 'state' => '~[\w\-]+'])
->name('templates');
/**
* Handle Documentation
*/
$router->get('docs', 'App\Controllers\DocsController@first');
$router
->get('docs/{id}', 'App\Controllers\DocsController@show')
->where('id', '[\w\-\/]+')
->name('documents');
/**
* Handle root
*/
$router->get('/', 'App\Controllers\RootController@show');
/**
* Handle Primer Frontend Assets
*/
$router->group('assets/primer', function ($group) {
$group->get('css/{file}', 'App\Controllers\AssetsController@stylesheet')->where('file', '.+');
$group->get('js/{file}', 'App\Controllers\AssetsController@javascript')->where('file', '.+');
$group->get('img/{file}', 'App\Controllers\AssetsController@image')->where('file', '.+');
});