Files
backend_vib360_laravel/app/Http/Requests/CreateDeviceRequest.php
2025-04-16 17:51:17 +05:30

37 lines
839 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Log;
class CreateDeviceRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
// Log::info("CreateDeviceRequest: " . json_encode($this->all()));
return [
'name' => 'required|string',
// 'type' => 'required|string|max:255',
'label' => 'required|string|max:255',
'customerId' => 'required',
];
}
}