39 lines
700 B
PHP
Executable File
39 lines
700 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Facades\Date;
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
/**
|
|
* @package App\Models
|
|
* @property integer $id
|
|
* @property string $path
|
|
* @property string $lang
|
|
* @property string $type
|
|
*
|
|
* @method string full_path()
|
|
*/
|
|
class ContractTemplate extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'path',
|
|
'lang',
|
|
"company",
|
|
'type',
|
|
];
|
|
|
|
public function full_path(): string
|
|
{
|
|
if (!empty($this->path)) {
|
|
return Storage::url($this->path);
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|