Level 30
I would die and dump
dd(request()) ;
and see if your getting the file in the request
mac, valet, new laravel 5.4 install
I keep getting FileNotFoundException. i even tried to change permission to 777 on storage directory.... help please
web.php
Route::get('/', function () {
return view('welcome');
});
Route::post('upload', function () {
$file = request()->file('photo')->store('photos');
return back();
});
welcome.blade.php
<form method="POST" action="/upload" enctype="multipart/form-data">
{{ csrf_field() }}
<input type="file" name="photo"></input>
<button type="sumbit">upload</button>
</form>
I just tried this on my valet, no issues with your code. Did you chmod -R 777 on the storage dir?
Please or to participate in this conversation.