PHP Classes

File: routes/api.php

Recommend this page to a friend!
  Classes of Edward Paul   Tower of Hanoi   routes/api.php   Download  
File: routes/api.php
Role: Application script
Content type: text/plain
Description: Application script
Class: Tower of Hanoi
Implement the Tower of Hanoi game on the Web
Author: By
Last change:
Date: Yesterday
Size: 378 bytes
 

Contents

Class file image Download
<?php

use App\Http\Controllers\TowerOfHanoiController;
use
Illuminate\Http\Request;
use
Illuminate\Support\Facades\Route;

Route::get('/user', function (Request $request) {
    return
$request->user();
})->
middleware('auth:sanctum');

Route::get('/state', [TowerOfHanoiController::class, 'getState']);
Route::post('/move/{from}/{to}', [TowerOfHanoiController::class, 'move']);