I'm trying to make my own simple CMS for laravel. I can add pages now and show them the only problem I have is the page url.
Route:
Route::group(array('prefix' => 'admin', 'before' => 'auth.admin'), function()
{
Route::resource('pages', 'App\Controllers\Admin\PagesController');
}
Now this is my link: http://domain.com/admin/pages/2 to access my page with id 2, in my database I have a slug column how can I change the link to the slug that belongs to id 2 so I get the following link:
Hope you can help me !