Skip to content

fix: Update service provider path and references to bigInt() #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ composer require sprout/sprout
Sprout is configured to make use of Laravel's package auto-discovery, so its service provider should be automatically
registered.
If you have this disabled, it's not working for some reason, or you'd like to manually control where Sprout is loaded,
you can manually register it in `bootstrap/app.php`, before your `AppServiceProvider`.
you can manually register it in `bootstrap/providers.php`, before your `AppServiceProvider`.

```php
return [
Expand Down Expand Up @@ -143,12 +143,12 @@ If you plan to continue with this driver, you'll need to add two columns to the

```php
$table->string('tenancy')->nullable();
$table->bigInt('tenant_id')->nullable();
$table->unsignedBigIntegereger('tenant_id')->nullable();
```

> [!NOTE]
> The `tenant_id` column should match the primary key of your tenant model, which by default within Laravel would
> be `BIGINT`, which is why `bigInt()` is used here.
> be `BIGINT`, which is why `unsignedBigInteger()` is used here.

The only other thing to consider here is that if you encounter CSRF issues when you first get started, clear your
cookies in your browser, and it'll fix the issue.
Expand Down
6 changes: 3 additions & 3 deletions service-overrides.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,15 @@ to the `password_resets` table in the
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('tenancy')->nullable();// [tl! ++]
$table->bigInt('tenant_id')->nullable();// [tl! ++]
$table->unsignedBigInteger('tenant_id')->nullable();// [tl! ++]
$table->string('token');
$table->timestamp('created_at')->nullable();
});
```

> [!NOTE]
> The `tenant_id` column should match the primary key of your tenant model, which by default within Laravel would
> be `BIGINT`, which is why `bigInt()` is used here.
> be `BIGINT`, which is why `unsignedBigInteger()` is used here.

### Cookie

Expand Down Expand Up @@ -344,7 +344,7 @@ to include the tenant-specific columns.
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('tenancy')->nullable();// [tl! ++]
$table->bigInt('tenant_id')->nullable();// [tl! ++]
$table->unsignedBigInteger('tenant_id')->nullable();// [tl! ++]
$table->foreignId('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
Expand Down