Файловый менеджер - Редактировать - /home/clickysoft/public_html/securebeans.clickysoft.net/app/Models/Income.php
Назад
<?php namespace App\Models; use \DateTimeInterface; use Carbon\Carbon; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class Income extends Model { use SoftDeletes; use HasFactory; public $table = 'incomes'; protected $dates = [ 'entry_date', 'created_at', 'updated_at', 'deleted_at', ]; protected $fillable = [ 'income_category_id', 'entry_date', 'amount', 'description', 'created_at', 'updated_at', 'deleted_at', ]; public function income_category() { return $this->belongsTo(IncomeCategory::class, 'income_category_id'); } public function getEntryDateAttribute($value) { return $value ? Carbon::parse($value)->format(config('panel.date_format')) : null; } public function setEntryDateAttribute($value) { $this->attributes['entry_date'] = $value ? Carbon::createFromFormat(config('panel.date_format'), $value)->format('Y-m-d') : null; } protected function serializeDate(DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка