mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 13:34:04 +00:00
wip
This commit is contained in:
commit
a92690cea8
61 changed files with 51214 additions and 0 deletions
20
source/docs/usage.md
Normal file
20
source/docs/usage.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: Usage
|
||||
description: Usage | stancl/tenancy — A Laravel multi-database tenancy package that respects your code..
|
||||
extends: _layouts.documentation
|
||||
section: content
|
||||
---
|
||||
|
||||
# Usage {#usage}
|
||||
|
||||
This chapter describes usage of the package. That includes creating tenants, deleting tenants, storing data in the tenant storage.
|
||||
|
||||
Most pages will use the `tenancy()` helper function. This package comes with two helpers - `tenancy()` and `tenant()`. They do the same thing, so you can use the one that reads better given its context.
|
||||
|
||||
`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')`](tenant-storage).
|
||||
|
||||
The package also comes with two facades. `Tenancy` and `Tenant`. Use what feels the best.
|
||||
|
||||
Both the helpers and the facades resolve the `TenantManager` from the service container.
|
||||
Loading…
Add table
Add a link
Reference in a new issue