i am upload image on laravel 11. when i uploading the image i ran into the problem with this error.what i tried the code i attached below.please look at the code snippet and get solve my error as soon as possiable.
Product Controller
public function store(Request $request) {
$fileName = public_path('images');
$requestData = $request->all();
$fileName = time().$request->file('photo')->getClientOriginalName();
Product::create($requestData);
return redirect()->back();
}`
Product Form
<div class="form-area">
<form method="POST" action="{{ route('product.store') }}">
@csrf
<div class="row">
<div class="col-md-6">
<label>Product Name</label>
<input type="text" class="form-control" name="productname">
</div>
<div class="col-md-6">
<label>Category</label></br>
<select name="cat_id" id="cat_id" class="form-control">
@foreach($categories as $id => $name)
<option value="{{ $id }}">{{ $name }}</option>
@endforeach
</select>
</div>
<div class="col-md-6">
<label>Description</label>
<input type="text" class="form-control" name="description">
</div>
<div class="col-md-6">
<label>Price</label>
<input type="text" class="form-control" name="price">
</div>
<div class="col-md-6">
<label>Image</label>
<input class="form-control" name="photo" type="file" id="photo">
</div>
</div>
<div class="row">
<div class="col-md-12 mt-3">
<input type="submit" class="btn btn-primary" value="Register">
</div>
</div>
</form>
</div>`
`