|
@@ -55,10 +55,8 @@ class CommonController extends Controller
|
55
|
55
|
public function upload(Request $request)
|
56
|
56
|
{
|
57
|
57
|
try {
|
58
|
|
- $photo = $_FILES['file'];
|
59
|
|
- //if ($request->hasFile('file') && $request->file('file')->isValid()) {
|
60
|
|
- if ($photo){
|
61
|
|
- //$photo = $request->file('file');
|
|
58
|
+ if ($request->hasFile('file') && $request->file('file')->isValid()) {
|
|
59
|
+ $photo = $request->file('file');
|
62
|
60
|
$extension = $photo->extension();
|
63
|
61
|
$path = $photo->getRealPath();
|
64
|
62
|
//$store_result = $photo->store('photo');
|