restore composer.json, add mysqli extension

This commit is contained in:
2026-04-15 17:02:52 +05:00
commit 77cf56a348
4317 changed files with 1397107 additions and 0 deletions

44
app/Models/ContractTemplate.php Executable file
View File

@@ -0,0 +1,44 @@
<?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)) {
if (in_array(env('FILESYSTEM_DISK'), ['s3', 'minio'])) {
return Storage::temporaryUrl(
$this->path,
Date::now()->addMinutes(5)
);
}
return '/' . $this->path;
}
return asset('storage/' . $this->path);
}
}