mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
created getAdmins function
This commit is contained in:
parent
ec13fa7d96
commit
1d3fbda7f5
@ -4,7 +4,10 @@
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Visiosoft\\ProfileModule\\": "src/"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"src/Support/_helpers.php"
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"maatwebsite/excel": "*"
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
<?php namespace Visiosoft\ProfileModule\Support\Command;
|
||||
|
||||
use Anomaly\UsersModule\Role\Contract\RoleRepositoryInterface;
|
||||
|
||||
class getAdmins
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
$adminRole = app(RoleRepositoryInterface::class)->findBySlug('admin');
|
||||
return $adminRole->getUsers();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
use Visiosoft\ProfileModule\Support\Command\getAdmins;
|
||||
|
||||
if (!function_exists('get_admins'))
|
||||
{
|
||||
function getAdmins() {
|
||||
return dispatch_now(new getAdmins());
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user