Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
WIKIPEDIA
/
imaliapi
/
app
:
GeneralMonthClose.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace App; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Spatie\Activitylog\LogOptions; use Spatie\Activitylog\Traits\LogsActivity; use DateTimeInterface; setlocale(LC_TIME, 'pt'); class GeneralMonthClose extends Model { use HasFactory; use LogsActivity; protected $fillable = [ 'transaction', 'date_reference', 'voucher_phone', 'voucher_tv', 'voucher_water', 'voucher_credelec', 'payment', 'transfer', 'total', 'voucher_phone_comision', 'voucher_tv_comision', 'voucher_water_comision', 'voucher_credelec_comision', 'payment_comision', 'transfer_comision', 'total_comitions', 'status', ]; protected static $logAttributes = [ 'transaction', 'date_reference', 'voucher_phone', 'voucher_tv', 'voucher_water', 'voucher_credelec', 'payment', 'transfer', 'total', 'voucher_phone_comision', 'voucher_tv_comision', 'voucher_water_comision', 'voucher_credelec_comision', 'payment_comision', 'transfer_comision', 'total_comitions', 'status', ]; protected $logAttribute = [ 'transaction', 'date_reference', 'voucher_phone', 'voucher_tv', 'voucher_water', 'voucher_credelec', 'payment', 'transfer', 'total', 'voucher_phone_comision', 'voucher_tv_comision', 'voucher_water_comision', 'voucher_credelec_comision', 'payment_comision', 'transfer_comision', 'total_comitions', 'status', ]; public function getDescriptionForEvent(string $eventName): string { return "This model has been {$eventName}"; } protected function serializeDate(DateTimeInterface $date) { return $date->format('d-m-Y H:i:s'); } public function getDateReferenceAttribute($value) { return date("F Y", strtotime($value)); } public function getActivitylogOptions(): LogOptions { return LogOptions::defaults()->logOnly($this->logAttribute); } }