mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 09:34:05 +00:00
Add return types to relationship methods
This commit is contained in:
parent
0f921c1362
commit
99fc1e3f87
1 changed files with 4 additions and 3 deletions
|
|
@ -8,6 +8,7 @@ use Stancl\Tenancy\Tests\Etc\Tenant;
|
|||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Stancl\Tenancy\Events\TenancyEnded;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Stancl\Tenancy\Events\TenancyInitialized;
|
||||
|
|
@ -177,7 +178,7 @@ test('queries are correctly scoped using RLS', function() {
|
|||
expect(UuidScopedComment::all()->pluck('text'))->toContain($post2Comment->text)->not()->toContain($post1Comment->text);
|
||||
|
||||
tenancy()->end();
|
||||
})->group('test');
|
||||
});
|
||||
|
||||
trait UsesUuidAsPrimaryKey
|
||||
{
|
||||
|
|
@ -205,12 +206,12 @@ class UuidPost extends Model
|
|||
protected $guarded = [];
|
||||
protected $keyType = 'string';
|
||||
|
||||
public function uuid_comments()
|
||||
public function uuid_comments(): HasMany
|
||||
{
|
||||
return $this->hasMany(UuidComment::class);
|
||||
}
|
||||
|
||||
public function uuid_scoped_comments()
|
||||
public function uuid_scoped_comments(): HasMany
|
||||
{
|
||||
return $this->hasMany(UuidComment::class);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue