1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of Laravel Ban. |
||
5 | * |
||
6 | * (c) Anton Komarev <[email protected]> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | declare(strict_types=1); |
||
13 | |||
14 | namespace Cog\Laravel\Ban\Traits; |
||
15 | |||
16 | use Cog\Contracts\Ban\Ban as BanContract; |
||
17 | use Illuminate\Database\Eloquent\Relations\MorphMany; |
||
18 | |||
19 | trait HasBansRelation |
||
20 | { |
||
21 | /** |
||
22 | * Entity Bans. |
||
23 | * |
||
24 | * @return \Illuminate\Database\Eloquent\Relations\MorphMany |
||
25 | */ |
||
26 | public function bans(): MorphMany |
||
27 | { |
||
28 | return $this->morphMany(app(BanContract::class), 'bannable'); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
29 | } |
||
30 | } |
||
31 |