mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 12:24:04 +00:00
Add docblocks to single-db models, add return types to relationship methods
This commit is contained in:
parent
c13fe5183f
commit
a46b26800f
3 changed files with 11 additions and 3 deletions
|
|
@ -3,8 +3,12 @@
|
|||
namespace Stancl\Tenancy\Tests\Etc;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Stancl\Tenancy\Database\Concerns\BelongsToTenant;
|
||||
|
||||
/**
|
||||
* This model is intended to be used with the single-database tenancy approach.
|
||||
*/
|
||||
class Post extends Model
|
||||
{
|
||||
use BelongsToTenant;
|
||||
|
|
@ -13,12 +17,12 @@ class Post extends Model
|
|||
|
||||
public $timestamps = false;
|
||||
|
||||
public function comments()
|
||||
public function comments(): HasMany
|
||||
{
|
||||
return $this->hasMany(Comment::class);
|
||||
}
|
||||
|
||||
public function scoped_comments()
|
||||
public function scoped_comments(): HasMany
|
||||
{
|
||||
return $this->hasMany(Comment::class);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue