1. 程式人生 > >laravel上傳檔案

laravel上傳檔案

$name = $request->input('name');
$file = $request->file('file');
$fileName = $file->getClientOriginalName();
$ext = $file->getClientOriginalExtension();
$res = $file -> move('./uploads/',$fileName);