From 5e19e83691b60f5ddb48c00536dd62f63b3f2c9b Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 5 Jan 2016 00:36:48 +0100 Subject: Can work with installation in subdirectory --- app/Http/routes.php | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/app/Http/routes.php b/app/Http/routes.php index 37cb27f..70e9164 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -28,16 +28,20 @@ | */ -$app->get('/', function () use ($app) { - return view('trainer'); +$app->group(['prefix' => parse_url(env('APP_URL'), PHP_URL_PATH)], function ($app) { + + $app->get('/', function () use ($app) { + return view('trainer'); + }); + + $app->get('/stem', function () use ($app) { + return \HebrewParseTrainer\Stem::all(); + }); + + $app->get('/tense', function () use ($app) { + return \HebrewParseTrainer\Tense::all(); + }); + + $app->get('/verb/random', 'App\Http\Controllers\RandomVerbController@show'); + }); - -$app->get('/stem', function () use ($app) { - return \HebrewParseTrainer\Stem::all(); -}); - -$app->get('/tense', function () use ($app) { - return \HebrewParseTrainer\Tense::all(); -}); - -$app->get('/verb/random', 'RandomVerbController@show'); -- cgit v1.2.3