From 29df7d0dd3dbe7fd71d3039d9a4bec522291d1ae Mon Sep 17 00:00:00 2001 From: horus Date: Tue, 22 Sep 2020 23:57:22 +0200 Subject: add hint and redirect --- resources/views/topicpopular.blade.php | 6 ++++++ routes/web.php | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/resources/views/topicpopular.blade.php b/resources/views/topicpopular.blade.php index e4d2b18..81c37d4 100644 --- a/resources/views/topicpopular.blade.php +++ b/resources/views/topicpopular.blade.php @@ -20,6 +20,12 @@ html {
Hint: You are looking at popular topics. If you are interested in the most popular articles instead, click here instead.
++ Hint: + + For a list of all topics please click here. + +
diff --git a/routes/web.php b/routes/web.php index 1930938..0693118 100644 --- a/routes/web.php +++ b/routes/web.php @@ -15,7 +15,8 @@ use Illuminate\Support\Facades\Route; Route::get('/', 'IndexController@index')->name('index'); Route::get('/topic/{topic}', 'IndexController@topic')->name('topic')->where('topic', '(.+)'); -Route::get('/topic/', 'IndexController@topicindex')->name('topic_index'); +Route::get('/topics/', 'IndexController@topicindex')->name('topic_index'); +Route::get('/topic/', function() { return redirect()->route('topic_index'); })->name('topic_redir'); Route::get('/new', 'IndexController@new')->name('new'); Route::get('/search', 'IndexController@search')->name('search'); Route::get('/popular/topics', 'IndexController@populartopics')->name('popular_topics'); -- cgit v1.2.3