Update checkout, enable editing of checkout, show details on invoices
This commit is contained in:
36
app/Http/Requests/CheckoutAddEdit.php
Normal file
36
app/Http/Requests/CheckoutAddEdit.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
/**
|
||||
* Editing Suppliers
|
||||
*/
|
||||
class CheckoutAddEdit extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return Auth::user()->isWholesaler();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => 'required|string|min:2|max:255',
|
||||
'active' => 'sometimes|accepted',
|
||||
'description' => 'nullable|string|min:2|max:255',
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user