2016-01-06 20:52:09 +01:00
|
|
|
<?php namespace app\Http\Requests;
|
|
|
|
|
|
|
|
use App\Http\Requests\Request;
|
|
|
|
use Illuminate\Validation\Factory;
|
|
|
|
|
2016-01-07 16:14:11 +01:00
|
|
|
|
|
|
|
class UpdateExpenseRequest extends Request
|
2016-01-06 20:52:09 +01:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* 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()
|
|
|
|
{
|
2016-01-07 20:39:51 +01:00
|
|
|
return [
|
2016-01-20 23:09:10 +01:00
|
|
|
'amount' => 'positive',
|
2016-01-08 19:01:00 +01:00
|
|
|
'expense_date' => 'required',
|
2016-01-07 20:39:51 +01:00
|
|
|
];
|
2016-01-06 20:52:09 +01:00
|
|
|
}
|
|
|
|
}
|