在注册用户时,他输入了一张照片,并且管理员可以在管理区域中查看这张照片
网页.php
Route::post('/head', 'ImageController@upload')->name('image.upload');
图像控制器.php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ImageController extends Controller
{
public function upload(Request $request)
{
$path = $request - file('image')->store('upload', 'public');
return view('default',['path'=> $path]);
}
}
(php artisan storage:link)输入
输入表格
<div class="form-group row">
<label for="ydostak" class="col-md-4 col-form-label text-md-right">{{ __('Фото удостоверение с двух сторон') }}</label>
<form action{{ route('image.upload')}}="" method="post" accept-charset="multipart/form-data">
{{ csrf_field() }}
<div class="form-group">
<input type="file" name="image">
</div>
</form>
</div>
提款表
@isset ($path)
<img class="img-fluid" scr="{{asset('/storage/'. $path)}}" alt="">
@endisset
跃然一笑
长风秋雁