mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
workflow change
This commit is contained in:
@@ -6,5 +6,17 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Config extends Model
|
||||
{
|
||||
//
|
||||
protected $casts = [
|
||||
'data' => 'array',
|
||||
];
|
||||
|
||||
public function data()
|
||||
{
|
||||
return $this->data[0];
|
||||
}
|
||||
|
||||
public static function getData($configName)
|
||||
{
|
||||
return Config::where('name',$configName)->first()->data();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user