Answer the question
In order to leave comments, you need to log in
Store( ) doesn't work, but move( ) does?
I have an array of photos from a form. In this example, I check if there are files in the array, if there are, then I save them. The store() method doesn't work for some reason, but move() does. Why?
if($request->hasFile('gallery')){
foreach ($request->gallery as $value) {
$extension = $value->extension();
$imgName = md5($value->getClientOriginalName()).'.'.$extension;
// $value->move(public_path('imgs'), $imgName); --- работает
$value->store('imgs');
}
}
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'visibility' => 'public',
],
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question