aboutsummaryrefslogtreecommitdiff
path: root/app/Http/routes.php
diff options
context:
space:
mode:
authorCamil Staps2016-01-05 00:36:48 +0100
committerCamil Staps2016-01-05 00:36:48 +0100
commit5e19e83691b60f5ddb48c00536dd62f63b3f2c9b (patch)
tree82c1b162b27ce4b31d7c23f0a364a958542dde59 /app/Http/routes.php
parentRemove .env.example (diff)
Can work with installation in subdirectory
Diffstat (limited to 'app/Http/routes.php')
-rw-r--r--app/Http/routes.php28
1 files 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');