2015-11-03 05:13:32 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Application Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here is where you can register all of the routes for an application.
|
|
|
|
| It is a breeze. Simply tell Lumen the URIs it should respond to
|
|
|
|
| and give it the Closure to call when that URI is requested.
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2015-11-05 23:34:43 +01:00
|
|
|
|
|
|
|
/* GET endpoints */
|
|
|
|
|
2015-11-04 02:56:03 +01:00
|
|
|
$app->get('/', ['as' => 'index', 'uses' => 'IndexController@showIndexPage']);
|
|
|
|
$app->get('/logout', ['as' => 'logout', 'uses' => 'UserController@logoutUser']);
|
|
|
|
$app->get('/login', ['as' => 'login', 'uses' => 'UserController@displayLoginPage']);
|
|
|
|
$app->get('/about', ['as' => 'about', 'uses' => 'StaticPageController@displayAbout']);
|
2015-11-05 23:34:43 +01:00
|
|
|
$app->get('/signup', ['as' => 'signup', 'uses' => 'UserController@displaySignupPage']);
|
|
|
|
$app->get('/admin', ['as' => 'admin', 'uses' => 'AdminController@displayAdminPage']);
|
|
|
|
$app->get('/{short_link}', ['uses' => 'LinkController@performRedirect']);
|
|
|
|
|
|
|
|
|
|
|
|
/* POST endpoints */
|
2015-11-04 02:56:03 +01:00
|
|
|
|
|
|
|
$app->post('/login', ['as' => 'plogin', 'uses' => 'UserController@performLogin']);
|
2015-11-06 00:16:55 +01:00
|
|
|
$app->post('/shorten', ['as' => 'shorten', 'uses' => 'LinkController@performShorten']);
|