FIX: fix localization of comments
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ Route::group([
|
|||||||
}
|
}
|
||||||
|
|
||||||
// display dashboard with some usefull information
|
// display dashboard with some usefull information
|
||||||
Route::get('/', 'Dashboard@getIndex')
|
Route::get('/', 'Dashboard\Dashboard@getIndex')
|
||||||
->name('admin.dashboard');
|
->name('admin.dashboard');
|
||||||
|
|
||||||
// list of all actions
|
// list of all actions
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ use Pingpong\Modules\Json;
|
|||||||
class SubmodulesManager extends ServiceProvider
|
class SubmodulesManager extends ServiceProvider
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Register the service provider.
|
* Boot submodules
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function register()
|
public function boot()
|
||||||
{
|
{
|
||||||
$enabledModules = \Module::enabled();
|
$enabledModules = \Module::enabled();
|
||||||
|
|
||||||
@@ -52,4 +52,14 @@ class SubmodulesManager extends ServiceProvider
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the service provider.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
// TODO: Implement register() method.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ class CommentsOverview extends Controller
|
|||||||
->with('author')
|
->with('author')
|
||||||
->orderBy('approved')
|
->orderBy('approved')
|
||||||
->orderBy('created_at', 'DESC')
|
->orderBy('created_at', 'DESC')
|
||||||
->paginate(20);
|
->paginate(25);
|
||||||
|
|
||||||
return view('article::admin/comments.overview', ['comments' => $comments]);
|
return view('article::admin/comments.overview', ['comments' => $comments]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
// routes for comments
|
|
||||||
|
|
||||||
Route::group([
|
Route::group([
|
||||||
|
'prefix' => LaravelLocalization::setLocale(),
|
||||||
|
'middleware' => ['localeSessionRedirect', 'localizationRedirect'],
|
||||||
|
'namespace' => 'Modules\Blog\Article\Http\Controllers\Admin'
|
||||||
|
], function () {
|
||||||
|
Route::group([
|
||||||
'middleware' => ['web', 'auth', 'adminMenu'],
|
'middleware' => ['web', 'auth', 'adminMenu'],
|
||||||
'prefix' => 'admin/comments',
|
'prefix' => 'admin/comments',
|
||||||
'namespace' => 'Modules\Blog\Article\Http\Controllers\Admin'
|
|
||||||
], function () {
|
], function () {
|
||||||
|
|
||||||
Route::get('/', 'CommentsOverview@getOverview')
|
Route::get('/', 'CommentsOverview@getOverview')
|
||||||
@@ -15,14 +17,12 @@ Route::group([
|
|||||||
|
|
||||||
Route::get('/approve/{id}', 'EditComment@approve')
|
Route::get('/approve/{id}', 'EditComment@approve')
|
||||||
->name('comments.approve');
|
->name('comments.approve');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::group([
|
// public routes
|
||||||
'middleware' => ['web'],
|
Route::group(['middleware' => ['web']], function () {
|
||||||
'prefix' => 'comments',
|
|
||||||
'namespace' => 'Modules\Blog\Article\Http\Controllers\Visitor'
|
|
||||||
], function () {
|
|
||||||
|
|
||||||
Route::post('/new/{id}', 'CreateNewComment@postNew')
|
Route::post('comments/new/{id}', 'CreateNewComment@postNew')
|
||||||
->name('comments.new');
|
->name('comments.new');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user