You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I generate helpers for this kind of using, is there any way to do this? :
<?php
namespace App\Facades\Models;
use App\Services\IdentityManagerService;
class IdentityManager
{
public static function __callStatic(string $name, array $arguments)
{
return self::resolve($name, $arguments);
}
private static function resolve(string $name, array $arguments)
{
return (app()->make(IdentityManagerService::class))->$name(...$arguments);
}
}
wich resolve this class:
<?php
namespace App\Services;
class IdentityManagerService
{
public const UNRAW_KEYS = ['account_id', 'parent_id', 'is_imported', 'hash', 'duplicate_ignore', 'bulk_identity_id'];
/**
* Create first parent identity and link at default identity on User
*
* @param array $newIdentity
* @return Identity
*/
public function createFirstIdentity(User $user, array $newIdentity): Identity
{
...
}
}
Versions:
Question:
Hi,
How can I generate helpers for this kind of using, is there any way to do this? :
wich resolve this class:
and is use like that:
How can i map my facade "IdentityManager" to my Service "IdentityManagerSerice"
Thx
The text was updated successfully, but these errors were encountered: