migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Authentication\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Language extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'languages';
|
||||
|
||||
protected $fillable = [
|
||||
'restaurant_id',
|
||||
'name',
|
||||
'code',
|
||||
'file_path',
|
||||
'flag',
|
||||
'is_default',
|
||||
'status',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'is_default' => 'boolean',
|
||||
];
|
||||
|
||||
/**
|
||||
* Accessor for full flag URL
|
||||
*/
|
||||
public function getFlagUrlAttribute()
|
||||
{
|
||||
return $this->flag ? asset("storage/{$this->flag}") : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor for full JSON file URL
|
||||
*/
|
||||
public function getFileUrlAttribute()
|
||||
{
|
||||
return $this->file_path ? asset("storage/{$this->file_path}") : null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user