im using a prepareforvalidation $this->merge(['px' => intval(str_replace(".","", $this->px))]); but its print result 1, how can i convert the string to integer in request validation laravel? thanks 0 @badrus_junior you can try this code as reference $px= [0=>'100....
See this example: http://laravel.com/docs/5.1/validation#form-request-validation In the example there is a Controller with method store: public function store(StoreBlogPostRequest $request) { // The incoming request is valid... // Do your casting of data $width = (int) $request->get('...