Initial Commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Concerns\HasUlids;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Business extends Model
|
||||
{
|
||||
use HasUlids;
|
||||
|
||||
protected $fillable = ['name', 'slug', 'description', 'email', 'phone', 'website', 'status', 'verified_at'];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['verified_at' => 'datetime'];
|
||||
}
|
||||
|
||||
public function users()
|
||||
{
|
||||
return $this->belongsToMany(User::class)->withPivot(['role'])->withTimestamps();
|
||||
}
|
||||
|
||||
public function profiles()
|
||||
{
|
||||
return $this->hasMany(DjProfile::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user