add upload files
This commit is contained in:
parent
e464d6a273
commit
0413103496
|
@ -1,6 +1,7 @@
|
|||
/.phpunit.cache
|
||||
/node_modules
|
||||
/public/build
|
||||
/public/uploads
|
||||
/public/hot
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
|
|
|
@ -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()}}
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue