Edit File: StorePlanRequest.php
<?php namespace App\Http\Requests\Admin\Plan; use Illuminate\Foundation\Http\FormRequest; class StorePlanRequest 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 [ 'duration'=>'required|gt:0', 'price'=>'required|numeric|gt:0', 'name_ar'=>'required', 'name_en'=>'required', 'desc_ar'=>'required', 'desc_en'=>'required', 'available'=>'nullable', 'logo' =>'nullable', ]; } public function messages(){ return [ 'duration.gt' => 'يجب ان تكون المده اكبر من صفر', 'price.gt' => 'يجب ان تكون سعر الباقه اكبر من 0', ]; } }
Back to File Manager