<?php

namespace App\Classes\Modules\Accounts\Services;


use App\Classes\ValueObjects\Constants\Roles;

class AuthenticationRedirect
{

    public function url(){
        $userRole = (int) Auth()->user()->role_id;

        if($userRole === Roles::ADMIN || $userRole === Roles::SUPER_ADMIN){
            return route('dashboard.forwarder');
        }

        return route('dashboard.importer', ['id' => Auth()->user()->employers->first()->company->id]);

    }

}