Skip to content

Commit 83cd922

Browse files
author
andy3471
committed
Redeem on Steam Fix
1 parent a661e13 commit 83cd922

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/Http/Controllers/KeysController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function store(Request $request)
7373
public function show($id)
7474
{
7575

76-
$key = Key::find($id);
76+
$key = Key::where('id', '=', $id)->with('platform')->first();
7777

7878
return view('keys.show')->withKey($key);
7979
}

resources/views/keys/show.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
@elseif( $key->owned_user_id == auth()->id())
2626
<input name="key" class="form-control" type="text" value ="{{$key->keycode}}" disabled>
27-
@if($key->platform == 'Steam')
27+
@if($key->platform->name == 'Steam')
2828
<br><a href="https://store.steampowered.com/account/registerkey?key={{$key->keycode}}"> Redeem on Steam</a>
2929
@endif
3030

0 commit comments

Comments
 (0)