mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Code cleanup.
This commit is contained in:
@@ -34,14 +34,15 @@ use Illuminate\Database\Query\Builder;
|
||||
* FireflyIII\Models\Configuration
|
||||
*
|
||||
* @property int $id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Carbon|null $deleted_at
|
||||
* @property null|Carbon $created_at
|
||||
* @property null|Carbon $updated_at
|
||||
* @property null|Carbon $deleted_at
|
||||
* @property string $name
|
||||
* @property mixed $data
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration newQuery()
|
||||
* @method static Builder|Configuration onlyTrashed()
|
||||
* @method static Builder|Configuration onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration whereData($value)
|
||||
@@ -49,8 +50,9 @@ use Illuminate\Database\Query\Builder;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Configuration whereUpdatedAt($value)
|
||||
* @method static Builder|Configuration withTrashed()
|
||||
* @method static Builder|Configuration withoutTrashed()
|
||||
* @method static Builder|Configuration withTrashed()
|
||||
* @method static Builder|Configuration withoutTrashed()
|
||||
*
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class Configuration extends Model
|
||||
@@ -58,20 +60,19 @@ class Configuration extends Model
|
||||
use ReturnsIntegerIdTrait;
|
||||
use SoftDeletes;
|
||||
|
||||
|
||||
protected $casts
|
||||
= [
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'deleted_at' => 'datetime',
|
||||
];
|
||||
|
||||
/** @var string The table to store the data in */
|
||||
protected $table = 'configuration';
|
||||
|
||||
/**
|
||||
* TODO can be replaced with native laravel code.
|
||||
*
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return mixed
|
||||
@@ -82,13 +83,10 @@ class Configuration extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function setDataAttribute($value): void
|
||||
{
|
||||
$this->attributes['data'] = json_encode($value);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user