20 lines
432 B
PHP
20 lines
432 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
class Cdr extends Model
|
|
{
|
|
protected $table = 'asteriskcdrdb.cdr';
|
|
|
|
protected function recordingfile(): Attribute
|
|
{
|
|
return Attribute::make(
|
|
get: fn($value) => $value == null ? null : url('/') . 'recordingfiles/' . $value
|
|
);
|
|
}
|
|
}
|