xxxxxxxxxx
// in laravel append the following at the top of controller
use File;
xxxxxxxxxx
// Class 'App\Http\Controllers\File' not found
use Illuminate\Support\Facades\File;
xxxxxxxxxx
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Config;
class UserController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
$appName = Config::get('app.name');
return view('users');
}
}
xxxxxxxxxx
"autoload": {
"psr-4": {
"App\\": "app/",
"App\\Http\\Controllers\\": "app/Http/Controllers/"
}
},