This is my route file:
Route::get('/','guzzle@guzzle');
And this is my controller class:
use App\Http\Requests;
use GuzzleHttp\Client;
class guzzle extends Controller
{
public function guzzle(){
$client = new GuzzleHttp\Client();
$request = $client->head('http://www.amazon.com');
$response = $request->send();
echo $response->getContentLength();
It gave me the following error message in my browser:
FatalErrorException in guzzle.php line 17:
Class 'App\Http\Controllers\GuzzleHttp\Client' not found
I don't know how to fix this issue. Who can help me?