Updated request methods

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-09-18 14:18:14 +01:00
parent abe79df6dc
commit bae9982833
2 changed files with 8 additions and 2 deletions

View file

@ -13,7 +13,7 @@ class CheckoutRequest extends Model
public function user()
{
return $this->belongsTo(User::class);
return $this->belongsTo(User::class, 'user_id', 'id');
}
public function requestingUser()

View file

@ -102,7 +102,13 @@
<td>
{{ Form::open([
'method' => 'POST',
'route' => ['account/request-item', $request->itemType(), $request->requestable->id, true, $request->requestingUser()->id],
'route' => [
'account/request-item',
$request->itemType(),
$request->requestable->id,
true,
$request->requestingUser()->id
],
]) }}
<button class="btn btn-warning btn-sm" data-tooltip="true" title="{{ trans('general.cancel_request') }}">{{ trans('button.cancel') }}</button>
{{ Form::close() }}