I am accessing the http://apigility.local/post where I have successfully added the ApiBlog module from this repository.
and added Symfony application. file into PostResource.php under the __construct method as bellow
public function __construct()
{
$symfonyApp = '/home/vallabh/www/symfony2app';
require_once $symfonyApp . '/app/AppKernel.php';
$kernel = new \AppKernel('prod', true);
$kernel->loadClassCache();
$kernel->boot();
$this->doctrine = $kernel->getContainer()
->get('doctrine')
->getManager();
}
But still error showing.
I have tested that AppKernel.php is successfully called into the __construct but while accessing the
api get request http://apigility.local/post thowring the errors as bellow.
Fatal error: Class 'Symfony\Component\HttpKernel\Kernel' not found in /home/vallabh/www/symfony2app/app/AppKernel.php on line 7
I am accessing the
http://apigility.local/postwhere I have successfully added the ApiBlog module from this repository.and added Symfony application. file into
PostResource.phpunder the __construct method as bellowBut still error showing.
I have tested that AppKernel.php is successfully called into the __construct but while accessing the
api get request
http://apigility.local/postthowring the errors as bellow.