first commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Api;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class AbsenRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* 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 [
|
||||
'nip' => 'required|string',
|
||||
'bukti' => 'required|file|mimes:pdf|max:1024',
|
||||
'keterangan' => 'required|string',
|
||||
'kategori' => 'required|integer',
|
||||
'tanggal' => 'required|date|date_format:Y-m-d|before_or_equal:' . date('Y-m-d'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user