1 | <?php |
||||
2 | |||||
3 | namespace CleaniqueCoders\Profile\Concerns; |
||||
4 | |||||
5 | use Illuminate\Database\Eloquent\Relations\BelongsTo; |
||||
6 | use Illuminate\Database\Eloquent\Relations\MorphMany; |
||||
7 | |||||
8 | /** |
||||
9 | * Bankable Trait. |
||||
10 | */ |
||||
11 | trait Bankable |
||||
12 | { |
||||
13 | /** |
||||
14 | * Get bank. |
||||
15 | */ |
||||
16 | public function bank(): BelongsTo |
||||
17 | { |
||||
18 | return $this->belongsTo( |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
19 | config('profile.profile.providers.bank.model') |
||||
20 | ); |
||||
21 | } |
||||
22 | |||||
23 | /** |
||||
24 | * Get all banks. |
||||
25 | */ |
||||
26 | public function banks(): MorphMany |
||||
27 | { |
||||
28 | return $this->morphMany( |
||||
0 ignored issues
–
show
It seems like
morphMany() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
29 | config('profile.providers.bank.model'), |
||||
30 | config('profile.providers.bank.type') |
||||
31 | ); |
||||
32 | } |
||||
33 | } |
||||
34 |