annotate app/Http/Requests/Client/StoreClientRequest.php @ 2:90296614b7e2 default tip

Adding in the base for the clients table
author luka
date Thu, 28 Aug 2025 20:55:40 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
1 <?php
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
2
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
3 namespace App\Http\Requests\Client;
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
4
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
5 use Illuminate\Foundation\Http\FormRequest;
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
6
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
7 class StoreClientRequest extends FormRequest
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
8 {
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
9 /**
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
10 * Determine if the user is authorized to make this request.
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
11 */
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
12 public function authorize(): bool
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
13 {
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
14 return true;
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
15 }
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
16
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
17 /**
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
18 * Get the validation rules that apply to the request.
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
19 *
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
20 * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
21 */
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
22 public function rules(): array
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
23 {
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
24 return [
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
25 'name' => 'nullable',
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
26 'email' => 'nullable',
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
27 'phone_number' => 'nullable',
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
28 'address' => 'nullable',
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
29 'notes' => 'nullable',
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
30
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
31 ];
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
32 }
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
33 }