I have This folder structure for my mvc project:
application
---admin
--------controller
--------model
--------view
--------language
---front
--------controller
------------------BlogController.php
--------model
--------view
--------language
core
public
I work With symfony router library and route my url like this:
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;
$routes = new RouteCollection();
$routes->add('blog_list', new Route('/blog', array(
'_controller' => [application\front\controller\BlogController::class, 'index']
)));
return $routes;
BlogController.php is:
namespace application\front\controller;
class BlogController extends Controller
{
/**
* Construct this object by extending the basic Controller class
*/
public function __construct()
{
parent::__construct();
}
public function index()
{
echo 'fine';
}
}
But In Action I can't see Any output. I think syfony can find my controller. Can I fix this problem ?!