37 lines
633 B
PHP
Executable File
37 lines
633 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Console\View\Components\Task;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
|
class App extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'apps';
|
|
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'created_at',
|
|
'updated_at',
|
|
'deleted_at',
|
|
'name_fa',
|
|
'type',
|
|
];
|
|
|
|
protected $TYPE = [
|
|
1=>'(خانگی)',
|
|
2=>'(همکار)'
|
|
];
|
|
|
|
public function getTypeFaAttribute(): string
|
|
{
|
|
return $this->TYPE[$this->type] ?? '';
|
|
}
|
|
|
|
} |