1<?php
2namespace App\Http\Controllers;
3
4use Illuminate\Support\Facades\Request;
5
6
7class UploadController extends Controller
8{
9
10 public function upload(Request $request)
11 {
12
13 if(Request::hasFile('file')){
14
15 echo 'Uploaded';
16 $file = Request::file('file');
17 $file->move('uploads', $file->getClientOriginalName());
18 echo '$file' . $file->getClientOriginalName() . '"/>';
19 }
20
21 }
22}
23