%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/CreateTimecardRequest.php

<?php

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

use App\Http\Requests\BaseRequest;

class CreateTimecardRequest 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 [
            'date'       => 'required|date',
            'start_time' => 'required|string',
            'end_time'   => 'required|string',
            'notes'      => 'nullable|string',
            'project_id' => 'required|integer|exists:projects,id',
        ];
    }

    public function messages()
    {
        return [
            'project_id.required' => 'You need to select a project to log hours into',
            'project_id.exists'   => 'You need to select a project to log hours into',
        ];
    }

}

Zerion Mini Shell 1.0