mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 19:04:03 +00:00
Rewrite old tests
This commit is contained in:
parent
64383b4c56
commit
89936187ce
71 changed files with 698 additions and 3203 deletions
|
|
@ -6,13 +6,15 @@ namespace Stancl\Tenancy\Features;
|
|||
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Stancl\Tenancy\Contracts\Feature;
|
||||
use Stancl\Tenancy\TenantManager;
|
||||
use Stancl\Tenancy\Tenancy;
|
||||
|
||||
class CrossDomainRedirect implements Feature
|
||||
{
|
||||
public function bootstrap(TenantManager $tenantManager): void
|
||||
public function bootstrap(Tenancy $tenancy): void
|
||||
{
|
||||
RedirectResponse::macro('domain', function (string $domain) {
|
||||
/** @var RedirectResponse $this */
|
||||
|
||||
// replace first occurance of hostname fragment with $domain
|
||||
$url = $this->getTargetUrl();
|
||||
$hostname = parse_url($url, PHP_URL_HOST);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue