The auth bridge: a contract for models that carry a {@see Partner}.
This is the standardized way the SDK reaches the Partner behind an
authenticated user (or any other partner-bearing domain entity). It is
the seam that lets the SDK enforce partner identity without assuming
anything about the host's auth table.
Use cases:
Auth::user().Partner.Typically applied to your App\Models\User. The SDK ships the
{@see \LaravelUi5\Sdk\Partners\Traits\HasPartner} trait as the default
binding (the users.partner_id convention); implement this interface
directly when your mapping differs.
Example:
class User extends Authenticatable implements HasPartnerInterface
{
use HasPartner; // or implement partner() yourself
}
| Methods | ||
|---|---|---|
public
|
partner(): ?Partner
|
# |