FEATURE: add translations for comment logged events
This commit is contained in:
@@ -4,12 +4,12 @@ namespace Modules\Blog\Article\Handlers;
|
||||
use App\Enumerations\ModulesHandlerToId;
|
||||
use App\Handlers\Contracts\ContentTitles;
|
||||
use App\Handlers\Handler;
|
||||
use App\Http\Controllers\Admin\EditContent;
|
||||
use App\Http\Controllers\Admin\Contents\EditContent;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\Request;
|
||||
use App\Models\ActionLogType;
|
||||
use App\Models\Content;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Modules\Blog\Article\Entities\Comment;
|
||||
|
||||
class Article extends Handler implements ContentTitles
|
||||
@@ -90,9 +90,8 @@ class Article extends Handler implements ContentTitles
|
||||
return $changedColumns;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Register admin menu
|
||||
*
|
||||
* @param User $user
|
||||
*/
|
||||
@@ -129,13 +128,30 @@ class Article extends Handler implements ContentTitles
|
||||
|
||||
/**
|
||||
* Install module
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function install()
|
||||
{
|
||||
// seed action log types
|
||||
// Artisan::call('')
|
||||
$types = [
|
||||
[
|
||||
'string_id' => 'commentCreated',
|
||||
'name' => 'article::comments.events.names.commentCreated',
|
||||
'value' => 'article::comments.events.descriptions.commentCreated',
|
||||
],
|
||||
[
|
||||
'string_id' => 'commentDeleted',
|
||||
'name' => 'article::comments.events.names.commentDeleted',
|
||||
'value' => 'article::comments.events.descriptions.commentDeleted',
|
||||
],
|
||||
[
|
||||
'string_id' => 'commentApproved',
|
||||
'name' => 'article::comments.events.names.commentApproved',
|
||||
'value' => 'article::comments.events.descriptions.commentApproved',
|
||||
],
|
||||
|
||||
];
|
||||
foreach ($types as $type) {
|
||||
ActionLogType::create($type);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user