Issues (22)

src/Models/BankAccount.php (2 issues)

1
<?php
2
3
namespace CleaniqueCoders\Profile\Models;
4
5
use CleaniqueCoders\Traitify\Concerns\InteractsWithUuid;
6
use Illuminate\Database\Eloquent\Model;
7
use Illuminate\Database\Eloquent\Relations\BelongsTo;
8
use Illuminate\Database\Eloquent\Relations\MorphTo;
9
10
class BankAccount extends Model
11
{
12
    use InteractsWithUuid;
0 ignored issues
show
The trait CleaniqueCoders\Traitify...cerns\InteractsWithUuid requires the property $uuid_column which is not provided by CleaniqueCoders\Profile\Models\BankAccount.
Loading history...
13
14
    protected $guarded = [
15
        'id',
16
    ];
17
18
    /**
19
     * Bank.
20
     */
21
    public function bank(): BelongsTo
22
    {
23
        return $this->belongsTo(Bank::class)->withDefault();
24
    }
25
26
    /**
27
     * Get all of the owning bank models.
28
     */
29
    public function bankable(): MorphTo
30
    {
31
        return $this->morphTo();
32
    }
33
34
    /**
35
     * Get Bank Name via Accessor.
36
     */
37
    public function getBankNameAttribute(): string
38
    {
39
        return $this->bank->name;
0 ignored issues
show
The property name does not seem to exist on CleaniqueCoders\Profile\Models\Bank. Are you sure there is no database migration missing?

Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.

Loading history...
40
    }
41
}
42