3 namespace App\Http\Controllers;
5 use App\Jobs\GenerateAosSeed;
6 use App\Models\AosSeed;
7 use Illuminate\Http\Request;
9 class AosSeedController extends Controller
12 public function byHash($hash) {
13 $seed = AosSeed::where('hash', '=', $hash)->firstOrFail();
16 $seed->makeHidden('seed');
19 $seed->makeHidden('settings');
22 return $seed->toJson();
25 public function retry($hash) {
26 $seed = AosSeed::where('hash', '=', $hash)->firstOrFail();
28 if ($seed->status == 'error') {
29 $seed->status = 'pending';
31 GenerateAosSeed::dispatch($seed)->onConnection('database');
34 return $seed->toJson();