.blade.md

This commit is contained in:
Samuel Štancl 2019-09-18 08:34:34 +02:00
parent b6ca271698
commit 773d66956f
53 changed files with 27 additions and 27 deletions

View file

@ -13,7 +13,7 @@ The `config/tenancy.php` file lets you configure how the package behaves.
### `storage_driver, storage` {#storage}
This lets you configure the driver for tenant storage, i.e. what will be used to store information about your tenants. You can read more about this on the [Storage Drivers](/docs/storage-drivers) page.
This lets you configure the driver for tenant storage, i.e. what will be used to store information about your tenants. You can read more about this on the [Storage Drivers]({{ $page->link('storage-drivers') }}) page.
Available storage drivers:
- `Stancl\Tenancy\StorageDrivers\RedisStorageDriver`
@ -53,4 +53,4 @@ The root of each disk listed in `tenancy.filesystem.disks` will be suffixed with
For disks listed in `root_override`, the root will be that string with `%storage_path%` replaced by `storage_path()` *after* tenancy has been initialized. All other disks will be simply suffixed with `tenancy.filesystem.suffix_base` + the tenant UUID.
Read more about this on the [Filesystem Tenancy](/docs/filesystem-tenancy) page.
Read more about this on the [Filesystem Tenancy]({{ $page->link('filesystem-tenancy') }}) page.

View file

@ -7,7 +7,7 @@ section: content
# Creating Tenants {#creating-tenants}
> **Make sure your database is correctly [configured](/docs/configuration/#database) before creating tenants.**
> **Make sure your database is correctly [configured]({{ $page->link('configuration/#database') }}) before creating tenants.**
To create a tenant, you can use

View file

@ -9,7 +9,7 @@ section: content
[**stancl/tenancy**](https://github.com/stancl/tenancy) is a Laravel multi-database tenancy package. It is designed in a way that requires you to make no changes to your codebase. Instead of applying traits on models and replacing every single reference to cache by a reference to a tenant-aware cache, the package lets you write your app without thinking about tenancy. It handles tenancy automatically.
> Note: Filesystem is the only thing that can be a little problematic. Be sure to read [that page](/docs/filesystem-tenancy).
> Note: Filesystem is the only thing that can be a little problematic. Be sure to read [that page]({{ $page->link('filesystem-tenancy') }}).
## How does it work? {#how-does-it-work}

View file

@ -7,7 +7,7 @@ section: content
# Horizon Integration
> Make sure your queue is [correctly configured](/docs/jobs-queues) before using Horizon.
> Make sure your queue is [correctly configured]({{ $page->link('jobs-queues') }}) before using Horizon.
Jobs are automatically tagged with the tenant's uuid and domain:

View file

@ -25,11 +25,11 @@ To install the package, simply run
php artisan tenancy:install
```
You will be asked if you want to store your data in Redis or a relational database. You can read more about this on the [Storage Drivers](/docs/storage-drivers) page.
You will be asked if you want to store your data in Redis or a relational database. You can read more about this on the [Storage Drivers]({{ $page->link('storage-drivers') }}) page.
This will do all the steps listed in the [Manual installation](#manual-installation) section for you.
The only thing you have to do now is create a database/Redis connection. Read the [Storage Drivers](/docs/storage-drivers) page for information about that.
The only thing you have to do now is create a database/Redis connection. Read the [Storage Drivers]({{ $page->link('storage-drivers') }}) page for information about that.
### Manual installation {#manual-installation}
@ -64,4 +64,4 @@ php artisan vendor:publish --provider='Stancl\Tenancy\TenancyServiceProvider' --
This creates a `config/tenancy.php`. You can use it to configure how the package works.
Configuration is explained in detail on the [Configuration](/docs/configuration) page.
Configuration is explained in detail on the [Configuration]({{ $page->link('configuration') }}) page.

View file

@ -9,4 +9,4 @@ section: content
This package naturally integrates well with Laravel packages, since it does not rely on you explicitly specifying database connections.
There are some exceptions, though. [Telescope integration](/docs/telescope), for example, requires you to change the database connection in `config/telescope.php` to a non-default one, because the default connection is switched to the tenant connection. Some packages should use a central connection for data storage.
There are some exceptions, though. [Telescope integration]({{ $page->link('telescope') }}), for example, requires you to change the database connection in `config/telescope.php` to a non-default one, because the default connection is switched to the tenant connection. Some packages should use a central connection for data storage.

View file

@ -9,7 +9,7 @@ section: content
Storage drivers are used to store a list of all tenants, their domains and any extra information you store about your tenants (e.g. their plan).
Currently, database and Redis storage drivers are available as part of the package. However, you can [write your own](/docs/writing-storage-drivers) (and contribute ❤️) storage drivers.
Currently, database and Redis storage drivers are available as part of the package. However, you can [write your own]({{ $page->link('writing-storage-drivers') }}) (and contribute ❤️) storage drivers.
## Database {#database}
@ -35,7 +35,7 @@ php artisan migrate
> If you use a non-default connection, such as `central`, you have to specify which DB to migrate using the `--database` option.
>
> If you have existing migrations related to your app in `database/migrations`, move them to `database/migrations/tenant`. You can read more about tenant migrations [here](/docs/console-commands/#migrate).
> If you have existing migrations related to your app in `database/migrations`, move them to `database/migrations/tenant`. You can read more about tenant migrations [here]({{ $page->link('console-commands/#migrate') }}).
## Redis {#redis}

View file

@ -128,7 +128,7 @@ class CacheManager extends BaseCacheManager
## Filesystem tenancy {#filesystem-tenancy}
`bootstrap()` calls `suffiexFilesystemRootPaths()`. This method changes `storage_path()` and the roots of disks listed in `config('tenancy.filesystem.disks)`. You can read more about this on the [Filesystem Tenancy](/docs/filesystem-tenancy) page.
`bootstrap()` calls `suffiexFilesystemRootPaths()`. This method changes `storage_path()` and the roots of disks listed in `config('tenancy.filesystem.disks)`. You can read more about this on the [Filesystem Tenancy]({{ $page->link('filesystem-tenancy') }}) page.
```php
public function suffixFilesystemRootPaths()

View file

@ -11,7 +11,7 @@ Routes within `routes/tenant.php` will have the `web` middleware group and the `
Just like `routes/web.php`, these routes use the `App\Http\Controllers` namespace.
> If a tenant cannot be identified, anexception will be thrown. If you want to change this behavior (to a redirect, for example) read the [Middleware Configuration](/docs/middleware-configuration) page.
> If a tenant cannot be identified, anexception will be thrown. If you want to change this behavior (to a redirect, for example) read the [Middleware Configuration]({{ $page->link('middleware-configuration') }}) page.
## Exempt routes {#exempt-routes}

View file

@ -13,7 +13,7 @@ Most pages will use the `tenancy()` helper function. This package comes with two
`tenant()->create()` reads better than `tenancy()->create()`, but `tenancy()->init()` reads better than `tenant()->init()`.
You can pass an argument to the helper function to get a value out of the tenant storage. `tenant('plan')` is identical to [`tenant()->get('plan')`](/docs/tenant-storage).
You can pass an argument to the helper function to get a value out of the tenant storage. `tenant('plan')` is identical to [`tenant()->get('plan')`]({{ $page->link('tenant-storage') }}).
The package also comes with two facades. `Tenancy` and `Tenant`. Use what feels the best.

View file

@ -13,7 +13,7 @@ The `config/tenancy.php` file lets you configure how the package behaves.
### `storage_driver, storage` {#storage}
This lets you configure the driver for tenant storage, i.e. what will be used to store information about your tenants. You can read more about this on the [Storage Drivers](/docs/storage-drivers) page.
This lets you configure the driver for tenant storage, i.e. what will be used to store information about your tenants. You can read more about this on the [Storage Drivers]({{ $page->link('storage-drivers') }}) page.
Available storage drivers:
- `Stancl\Tenancy\StorageDrivers\RedisStorageDriver`
@ -53,4 +53,4 @@ The root of each disk listed in `tenancy.filesystem.disks` will be suffixed with
For disks listed in `root_override`, the root will be that string with `%storage_path%` replaced by `storage_path()` *after* tenancy has been initialized. All other disks will be simply suffixed with `tenancy.filesystem.suffix_base` + the tenant UUID.
Read more about this on the [Filesystem Tenancy](/docs/filesystem-tenancy) page.
Read more about this on the [Filesystem Tenancy]({{ $page->link('filesystem-tenancy') }}) page.

View file

@ -9,7 +9,7 @@ section: content
[**stancl/tenancy**](https://github.com/stancl/tenancy) is a Laravel multi-database tenancy package. It is designed in a way that requires you to make no changes to your codebase. Instead of applying traits on models and replacing every single reference to cache by a reference to a tenant-aware cache, the package lets you write your app without thinking about tenancy. It handles tenancy automatically.
> Note: Filesystem is the only thing that can be a little problematic. Be sure to read [that page](/docs/filesystem-tenancy).
> Note: Filesystem is the only thing that can be a little problematic. Be sure to read [that page]({{ $page->link('filesystem-tenancy') }}).
## How does it work? {#how-does-it-work}

View file

@ -7,7 +7,7 @@ section: content
# Horizon Integration
> Make sure your queue is [correctly configured](/docs/jobs-queues) before using Horizon.
> Make sure your queue is [correctly configured]({{ $page->link('jobs-queues') }}) before using Horizon.
Jobs are automatically tagged with the tenant's uuid and domain:

View file

@ -25,11 +25,11 @@ To install the package, simply run
php artisan tenancy:install
```
You will be asked if you want to store your data in Redis or a relational database. You can read more about this on the [Storage Drivers](/docs/storage-drivers) page.
You will be asked if you want to store your data in Redis or a relational database. You can read more about this on the [Storage Drivers]({{ $page->link('storage-drivers') }}) page.
This will do all the steps listed in the [Manual installation](#manual-installation) section for you.
The only thing you have to do now is create a database/Redis connection. Read the [Storage Drivers](/docs/storage-drivers) page for information about that.
The only thing you have to do now is create a database/Redis connection. Read the [Storage Drivers]({{ $page->link('storage-drivers') }}) page for information about that.
### Manual installation {#manual-installation}
@ -64,4 +64,4 @@ php artisan vendor:publish --provider='Stancl\Tenancy\TenancyServiceProvider' --
This creates a `config/tenancy.php`. You can use it to configure how the package works.
Configuration is explained in detail on the [Configuration](/docs/configuration) page.
Configuration is explained in detail on the [Configuration]({{ $page->link('configuration') }}) page.

View file

@ -9,4 +9,4 @@ section: content
This package naturally integrates well with Laravel packages, since it does not rely on you explicitly specifying database connections.
There are some exceptions, though. [Telescope integration](/docs/telescope), for example, requires you to change the database connection in `config/telescope.php` to a non-default one, because the default connection is switched to the tenant connection. Some packages should use a central connection for data storage.
There are some exceptions, though. [Telescope integration]({{ $page->link('telescope') }}), for example, requires you to change the database connection in `config/telescope.php` to a non-default one, because the default connection is switched to the tenant connection. Some packages should use a central connection for data storage.

View file

@ -9,7 +9,7 @@ section: content
Storage drivers are used to store a list of all tenants, their domains and any extra information you store about your tenants (e.g. their plan).
Currently, database and Redis storage drivers are available as part of the package. However, you can [write your own](/docs/writing-storage-drivers) (and contribute ❤️) storage drivers.
Currently, database and Redis storage drivers are available as part of the package. However, you can [write your own]({{ $page->link('writing-storage-drivers') }}) (and contribute ❤️) storage drivers.
## Database {#database}
@ -35,7 +35,7 @@ php artisan migrate
> If you use a non-default connection, such as `central`, you have to specify which DB to migrate using the `--database` option.
>
> If you have existing migrations related to your app in `database/migrations`, move them to `database/migrations/tenant`. You can read more about tenant migrations [here](/docs/console-commands/#migrate).
> If you have existing migrations related to your app in `database/migrations`, move them to `database/migrations/tenant`. You can read more about tenant migrations [here]({{ $page->link('console-commands/#migrate') }}).
## Redis {#redis}

View file

@ -128,7 +128,7 @@ class CacheManager extends BaseCacheManager
## Filesystem tenancy {#filesystem-tenancy}
`bootstrap()` calls `suffiexFilesystemRootPaths()`. This method changes `storage_path()` and the roots of disks listed in `config('tenancy.filesystem.disks)`. You can read more about this on the [Filesystem Tenancy](/docs/filesystem-tenancy) page.
`bootstrap()` calls `suffiexFilesystemRootPaths()`. This method changes `storage_path()` and the roots of disks listed in `config('tenancy.filesystem.disks)`. You can read more about this on the [Filesystem Tenancy]({{ $page->link('filesystem-tenancy') }}) page.
```php
public function suffixFilesystemRootPaths()

View file

@ -11,7 +11,7 @@ Routes within `routes/tenant.php` will have the `web` middleware group and the `
Just like `routes/web.php`, these routes use the `App\Http\Controllers` namespace.
> If a tenant cannot be identified, anexception will be thrown. If you want to change this behavior (to a redirect, for example) read the [Middleware Configuration](/docs/middleware-configuration) page.
> If a tenant cannot be identified, anexception will be thrown. If you want to change this behavior (to a redirect, for example) read the [Middleware Configuration]({{ $page->link('middleware-configuration') }}) page.
## Exempt routes {#exempt-routes}

View file

@ -13,7 +13,7 @@ Most pages will use the `tenancy()` helper function. This package comes with two
`tenant()->create()` reads better than `tenancy()->create()`, but `tenancy()->init()` reads better than `tenant()->init()`.
You can pass an argument to the helper function to get a value out of the tenant storage. `tenant('plan')` is identical to [`tenant()->get('plan')`](/docs/tenant-storage).
You can pass an argument to the helper function to get a value out of the tenant storage. `tenant('plan')` is identical to [`tenant()->get('plan')`]({{ $page->link('tenant-storage') }}).
The package also comes with two facades. `Tenancy` and `Tenant`. Use what feels the best.