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