Home > Net >  How Do i get value Of name='blur' From html Form in My Laravel Controller
How Do i get value Of name='blur' From html Form in My Laravel Controller

Time:09-11

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Intervention\Image\ImageManagerStatic as Image;
class IamgesController extends Controller
{
public function uploadimage(Request $request)
{
    $imagefile=$request->photo;
    if($imagefile!=null){
        $image=$request->file('photo');
        $filename=time().'.'.$request->photo->extension();
        $imageResize=Image::make($image->getRealPath());
        $blurvalue= **Here I want To Get A Numeric Value From HTML FORM**           
        $imageResize->blur($blurvalue);
        $imageResize->save(public_path($filename));
        echo "<img src='".$filename."'>";
    }

}
}

I Am A NewBie In Laravel, I want To Get value from HTML Form IN my Controller, I tried Many Solution But None of any is working.

CodePudding user response:

HTTP Requests in Laravel Document

HTML Form:

<input name="blur">

Laravel Controller :

public function uploadimage(Request $request)
{
    //get blur input value
    $blurValue = $request->blur;
...

return $request->all(); return all inputs values

  • Related