diff --git a/navigation.php b/navigation.php index 1f1befb..32f9c88 100644 --- a/navigation.php +++ b/navigation.php @@ -207,6 +207,7 @@ return [ 'Livewire' => 'integrations/livewire', 'Orchid' => 'integrations/orchid', 'Sanctum' => 'integrations/sanctum', + 'Sail' => 'integrations/sail', ], ], 'Console commands' => 'console-commands', diff --git a/source/docs/v3/integrating.blade.md b/source/docs/v3/integrating.blade.md index 1f3d9dc..eaaf395 100644 --- a/source/docs/v3/integrating.blade.md +++ b/source/docs/v3/integrating.blade.md @@ -16,3 +16,4 @@ If you're using the [automatic mode]({{ $page->link('automatic-mode') }}) & [mul - [Laravel Telescope]({{ $page->link('integrations/telescope') }}) - [Livewire]({{ $page->link('integrations/livewire') }}) - [Laravel Sanctum]({{ $page->link('integrations/sanctum') }}) +- [Laravel Sail]({{ $page->link('integrations/sail') }}) diff --git a/source/docs/v3/integrations/sail.blade.md b/source/docs/v3/integrations/sail.blade.md new file mode 100644 index 0000000..6a0e90c --- /dev/null +++ b/source/docs/v3/integrations/sail.blade.md @@ -0,0 +1,40 @@ +--- +title: Laravel Sail integration +extends: _layouts.documentation +section: content +--- + +# Laravel Sail {#sail} + +## Central domains + +If you're using Laravel Sail, no changes are needed, default values are good to go: + +```php +// config/tenancy.php + +'central_domains' => [ + '127.0.0.1', + 'localhost', +], +``` + +## Creating tenants + +Before creating any tenants you have to ensure that the `sail` user has the necessary permissions. + +To do so either login to the mysql shell or via any client using root user credentials and run the following queries: + +```bash +GRANT ALL PRIVILEGES on *.* to 'sail'@'%'; +FLUSH PRIVILEGES; +``` + +If you are using [Database Customization]({{ $page->link('customizing-databases') }}), then you will have add the following GRANT as well: + +```bash +GRANT GRANT OPTION on central_database.* to 'sail'@'%'; +FLUSH PRIVILEGES; +``` + +This grant allows the central database to grant permissions to other users.