%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/hr/api/app/Http/Requests/Api/v1/Clients/
Upload File :
Create Path :
Current File : /var/www/html/hr/api/app/Http/Requests/Api/v1/Clients/CreateClientRequest.php

<?php

namespace App\Http\Requests\Api\v1\Clients;

use App\Http\Requests\BaseRequest;
use App\Models\BaseModel;

class CreateClientRequest extends BaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        $user = BaseModel::getLoggedInUser();
        return $user->isManager() || $user->isAdmin();
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name'       => 'required|string',
            'address'    => 'nullable|string',
            'email'      => 'nullable|string',
            'phone'      => 'nullable|string',
            'vat_number' => 'nullable|string',
        ];
    }
}

Zerion Mini Shell 1.0