Skip to content

Instantly share code, notes, and snippets.

@jocoonopa
Last active November 11, 2019 15:26
Show Gist options
  • Save jocoonopa/fb0c41efc1846211c26b9034f87fadc9 to your computer and use it in GitHub Desktop.
Save jocoonopa/fb0c41efc1846211c26b9034f87fadc9 to your computer and use it in GitHub Desktop.
<?php
use Hyn\Tenancy\Database\Connection;
/**
Choose Tenancy Website 😄
*/
$website = App\Website::whereHas('customer', function ($q) {
$q->whereName('systex');
})->first();
$connection = app(Connection::class);
$connection->set($website);
$connection->purge('');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment