]> git.localhorst.tv Git - alttp.git/blob - app/Http/Controllers/AosSeedController.php
3e3a2b05afcd293acd034bb2bf79f5e2e4daa9b4
[alttp.git] / app / Http / Controllers / AosSeedController.php
1 <?php
2
3 namespace App\Http\Controllers;
4
5 use App\Models\AosSeed;
6 use Illuminate\Http\Request;
7
8 class AosSeedController extends Controller
9 {
10
11         public function byHash($hash) {
12                 $seed = AosSeed::where('hash', '=', $hash)->firstOrFail();
13
14                 if ($seed->race) {
15                         $seed->makeHidden('seed');
16                 }
17                 if ($seed->mystery) {
18                         $seed->makeHidden('settings');
19                 }
20
21                 return $seed->toJson();
22         }
23
24 }