Z
Z
Zagoruyko Victor2020-02-16 00:23:11
Laravel
Zagoruyko Victor, 2020-02-16 00:23:11

Help in Laravel CNC?

Began to deal with Larka. I quickly made an analogue of the blog - lara.zacompom.ru (not advertising). Everything seems to be working, but not quite right. Need help with CNC.
I have a blog on WordPress (zacompom.ru), I want to transfer it to Larka). It seems not a problem, but rested on the CNC. I want to make them the same as now on my blog, that is: domain/category slug/post_slug.html, so that positions do not sink too much)
Now the question itself is: how to do this? I wanted to quickly throw, but nothing happened.
Add. infa: there are 2 tables, posts and categories. Naturally in posts - articles in a different category. How can I make the link I need?
A couple of screenshots: posts https://habrastorage.org/webt/k2/pk/cn/k2pkcnbdj2l...
and this is how categories look like:https://habrastorage.org/webt/tp/1s/bg/tp1sbgekper...
Routes:
Route::get('/', '[email protected]');
Route::get('/post/{slug}', '[email protected]')->name('post.show');
Route::get('/tag/{slug}', '[email protected]')->name('tag.show');
Route::get('/category/{slug}', '[email protected]')->name('category.show');
Route::post('/subscribe', '[email protected]');
Route::get('/verify/{token}', '[email protected]');

I also ask you not to kick much until it reaches)
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasyl Fomin, 2020-02-16
@fomvasss

You can use this package and set your own urls for different entities https://github.com/fomvasss/laravel-url-aliases (not advertising)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question