added requests

This commit is contained in:
Denis Duliçi
2020-09-06 17:06:10 +03:00
parent 7a1069bb5c
commit 74ebff9940
5 changed files with 72 additions and 43 deletions

View File

@ -0,0 +1,30 @@
<?php
namespace App\Http\Requests\Portal;
use App\Abstracts\Http\FormRequest;
class InvoiceShow extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return $this->invoice->contact_id == user()->contact->id;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}

View File

@ -0,0 +1,30 @@
<?php
namespace App\Http\Requests\Portal;
use App\Abstracts\Http\FormRequest;
class PaymentShow extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return $this->payment->contact_id == user()->contact->id;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//
];
}
}