|string> */ public function rules() { return [ 'first_name' => 'required|string|max:255', // First name is required and a string 'last_name' => 'required|string|max:255', // Last name is required and a string 'company_id' => 'required|exists:companies,id', // Company should be valid 'email' => 'nullable|email|max:255', // Email is optional but must be a valid email if provided 'phone' => 'nullable|string|max:20', // Phone is optional and can be a string up to 20 characters ]; } }