I installed Memcached on centos 7 and according to phpinfo() Memcached 3.0.4 is available. I also checked for Memcached with ps -eaf | grep Memcached and it was ok. But when I try to make an instance of Memcached() in laravel it returns an Error :
"Class 'App\Utils\Memcached' not found"
This is my code :
<?php
namespace App\Utils;
class MemTools {
private $mem;
public function __construct() {
$this->mem = new Memcached();
$this->mem->addServer('localhost',11211) or die ("Could not connect");
}
}