added requests
This commit is contained in:
30
app/Http/Requests/Portal/InvoiceShow.php
Normal file
30
app/Http/Requests/Portal/InvoiceShow.php
Normal 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 [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
30
app/Http/Requests/Portal/PaymentShow.php
Normal file
30
app/Http/Requests/Portal/PaymentShow.php
Normal 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 [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user