eOSP2/app/operations.php

19 lines
414 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
class operations extends Model
{
//
protected $primaryKey = 'id';
protected $fillable = ['fireStationID', 'operationDate', 'location', 'target', 'dangerType', 'description', 'commanderID'];
public function getFromOperationsAttribute($value){
return \Carbon\Carbon::parse($value)->format('d-m-Y');
}
}