aboutsummaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/console.php10
-rw-r--r--routes/web.php15
2 files changed, 25 insertions, 0 deletions
diff --git a/routes/console.php b/routes/console.php
new file mode 100644
index 0000000..19cef70
--- /dev/null
+++ b/routes/console.php
@@ -0,0 +1,10 @@
+<?php
+
+use Illuminate\Foundation\Console\ClosureCommand;
+use Illuminate\Foundation\Inspiring;
+use Illuminate\Support\Facades\Artisan;
+
+Artisan::command('inspire', function () {
+ /** @var ClosureCommand $this */
+ $this->comment(Inspiring::quote());
+})->purpose('Display an inspiring quote');
diff --git a/routes/web.php b/routes/web.php
new file mode 100644
index 0000000..fc05718
--- /dev/null
+++ b/routes/web.php
@@ -0,0 +1,15 @@
+<?php
+
+use App\Http\Controllers\PlayerController;
+use Illuminate\Support\Facades\Route;
+
+Route::get('/', function () {
+ return view('welcome');
+});
+
+Route::view('/register', 'register');
+Route::view('/login', 'login');
+
+Route::post('/register', [PlayerController::class, 'register']);
+Route::post('/login', [PlayerController::class, 'login']);
+Route::post('/login/score', [PlayerController::class, 'score']);