How to change my route path from database?

108 Views Asked by At

I have BlogController that has multi actions in it. I want to be able to change my route path to another from my database. Suppose I want to change the word blog to news in my database.

namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;

class BlogController extends AbstractController
{
    /**
     * @Route("/blog", name="blog_list") BEFORE CHANGE
     * @Route("/news", name="blog_list") AFTER CHANGE
     */
    public function list()
    {
        // ...
    }
}

it is possible?

0

There are 0 best solutions below