Files
admin-php-module/database/seeders/AddStaffRights.php
miroman-afk c4dc6e02a0 v.2.30
Добавлен расширенный отчет по реализации
Добавлен монитор активности
2023-08-03 11:05:15 +03:00

40 lines
1.2 KiB
PHP

<?php
namespace Database\Component\Seeders;
use App\Component\Models\Right;
use Illuminate\Database\Seeder;
class AddStaffRights extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
if (Right::where('code', 'clean')->count() == 0) {
Right::add('clean', 'Обрезка базы');
}
if (Right::where('code', 'marketplace')->count() == 0) {
Right::add('marketplace', 'Маркетплейс');
}
if (Right::where('code', 'update')->count() == 0) {
Right::add('update', 'Обновления');
}
if (Right::where('code', 'roommap')->count() == 0) {
Right::add('roommap', 'Карта залов');
}
if (Right::where('code', 'eorders')->count() == 0) {
Right::add('eorders', 'Онлайн заказы');
}
if (Right::where('code', 'loyalty')->count() == 0) {
Right::add('loyalty', 'Loyalty');
}
if (Right::where('code', 'activitymonitor')->count() == 0) {
Right::add('activitymonitor', 'Монитор активности');
}
}
}