add upload files
This commit is contained in:
parent
e464d6a273
commit
0413103496
|
@ -1,6 +1,7 @@
|
||||||
/.phpunit.cache
|
/.phpunit.cache
|
||||||
/node_modules
|
/node_modules
|
||||||
/public/build
|
/public/build
|
||||||
|
/public/uploads
|
||||||
/public/hot
|
/public/hot
|
||||||
/public/storage
|
/public/storage
|
||||||
/storage/*.key
|
/storage/*.key
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
<meta name="csrf-param" content="_token" />
|
<meta name="csrf-param" content="_token" />
|
||||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||||
<h2>список пользователей</h2>
|
<h2>список пользователей</h2>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
<a href="{{ route('users.create') }}"> создать пользователя</a>
|
<a href="{{ route('users.create') }}"> создать пользователя</a>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
@ -31,3 +32,11 @@
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</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
|
<?php
|
||||||
|
|
||||||
use App\Http\Controllers\ProfileController;
|
use App\Http\Controllers\ProfileController;
|
||||||
|
use App\Http\Controllers\UploadFileController;
|
||||||
use App\Http\Controllers\UserController;
|
use App\Http\Controllers\UserController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
@ -21,6 +22,8 @@ Route::get('/', function () {
|
||||||
|
|
||||||
Route::resource('/users', UserController::class);
|
Route::resource('/users', UserController::class);
|
||||||
|
|
||||||
|
Route::post('/uploadfile', [UploadFileController::class, 'showUploadFile'])->name('uploadfile');
|
||||||
|
|
||||||
Route::get('/test', function () {
|
Route::get('/test', function () {
|
||||||
return view('test');
|
return view('test');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue