FIX: fix localization of comments

This commit is contained in:
Michal Kváček
2016-09-23 00:02:25 +02:00
parent 139373145a
commit 72f7b9a047
4 changed files with 32 additions and 22 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ Route::group([
}
// display dashboard with some usefull information
Route::get('/', 'Dashboard@getIndex')
Route::get('/', 'Dashboard\Dashboard@getIndex')
->name('admin.dashboard');
// list of all actions
+12 -2
View File
@@ -9,11 +9,11 @@ use Pingpong\Modules\Json;
class SubmodulesManager extends ServiceProvider
{
/**
* Register the service provider.
* Boot submodules
*
* @return void
*/
public function register()
public function boot()
{
$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')
->orderBy('approved')
->orderBy('created_at', 'DESC')
->paginate(20);
->paginate(25);
return view('article::admin/comments.overview', ['comments' => $comments]);
}
+18 -18
View File
@@ -1,28 +1,28 @@
<?php
// routes for comments
Route::group([
'middleware' => ['web', 'auth', 'adminMenu'],
'prefix' => 'admin/comments',
'prefix' => LaravelLocalization::setLocale(),
'middleware' => ['localeSessionRedirect', 'localizationRedirect'],
'namespace' => 'Modules\Blog\Article\Http\Controllers\Admin'
], function () {
Route::group([
'middleware' => ['web', 'auth', 'adminMenu'],
'prefix' => 'admin/comments',
], function () {
Route::get('/', 'CommentsOverview@getOverview')
->name('comments.overview');
Route::get('/', 'CommentsOverview@getOverview')
->name('comments.overview');
Route::get('/delete/{id}', 'EditComment@delete')
->name('comments.delete');
Route::get('/delete/{id}', 'EditComment@delete')
->name('comments.delete');
Route::get('/approve/{id}', 'EditComment@approve')
->name('comments.approve');
});
Route::get('/approve/{id}', 'EditComment@approve')
->name('comments.approve');
});
Route::group([
'middleware' => ['web'],
'prefix' => 'comments',
'namespace' => 'Modules\Blog\Article\Http\Controllers\Visitor'
], function () {
// public routes
Route::group(['middleware' => ['web']], function () {
Route::post('/new/{id}', 'CreateNewComment@postNew')
->name('comments.new');
Route::post('comments/new/{id}', 'CreateNewComment@postNew')
->name('comments.new');
});
});