Sh3ll
OdayForums


Server : Apache
System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64
User : tradze ( 1001)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /home/tradze/public_html/app/Modules/Users/Http/Requests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/tradze/public_html/app/Modules/Users/Http/Requests/ClientUpdAvatarRequest.php
<?php
namespace App\Modules\Users\Http\Requests;

use App\Http\Requests\Request;
use Illuminate\Foundation\Http\FormRequest;

class ClientUpdAvatarRequest extends FormRequest
{

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'avatar' => 'required|image|dimensions:min_width=100,min_height=100',
        ];
    }

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

    /**
     * Get the proper failed validation response for the request.
     *
     * @param  array  $errors
     * @return \Symfony\Component\HttpFoundation\Response
     */
    public function response(array $errors)
    {
        if (($this->ajax() && ! $this->pjax()) || $this->wantsJson()) {
            return new JsonResponse($errors, 422);
        }

        return $this->redirector->to($this->getRedirectUrl()."#tab_1_2")
            ->withInput($this->except($this->dontFlash))
            ->withErrors($errors, $this->errorBag);
    }

//    /**
//     * Customize messages
//     * @return array
//     */
//    public function messages()
//    {
//        return [
//            'name.required' => trans('services::duration.message_error_name_required'),
//            'category_id.required' => trans('services::duration.message_error_category_id_required'),
//            'category_id.min' => trans('services::duration.message_error_category_id_required'),
//            'duration.min' => trans('services::duration.message_error_duration_min',['min'=>30]),
//            'price.numeric' => trans('services::duration.message_error_price_numeric'),
//            'price.min' => trans('services::duration.message_error_price_numeric',['min'=>0]),
//        ];
//    } //end method
}

ZeroDay Forums Mini