add upload files

This commit is contained in:
AslanAV 2024-01-16 16:24:44 +03:00
parent e464d6a273
commit 0413103496
3 changed files with 14 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
/.phpunit.cache
/node_modules
/public/build
/public/uploads
/public/hot
/public/storage
/storage/*.key

View File

@ -2,7 +2,8 @@
<meta name="csrf-param" content="_token" />
@vite(['resources/css/app.css', 'resources/js/app.js'])
<h2>список пользователей</h2>
<br>
<br>
<a href="{{ route('users.create') }}"> создать пользователя</a>
<br>
<br>
@ -31,3 +32,11 @@
@endforeach
</tbody>
</table>
<br>
<br>
{{ Form::open(array('url' => route('uploadfile'), 'method' => 'POST', 'files'=>'true')) }}
Select the file to upload.
{{ Form::file('image') }}
{{ Form::submit('Upload File')}}
{{Form::close()}}

View File

@ -1,6 +1,7 @@
<?php
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\UploadFileController;
use App\Http\Controllers\UserController;
use Illuminate\Support\Facades\Route;
@ -21,6 +22,8 @@ Route::get('/', function () {
Route::resource('/users', UserController::class);
Route::post('/uploadfile', [UploadFileController::class, 'showUploadFile'])->name('uploadfile');
Route::get('/test', function () {
return view('test');
});