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

55
app/Models/Page.php Executable file
View File

@@ -0,0 +1,55 @@
<?php
namespace App\Models;
use App\Traits\LogOptionsTrait;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\App;
use Spatie\Activitylog\Traits\LogsActivity;
class Page extends Model
{
use LogsActivity, LogOptionsTrait;
protected $guarded = ['id'];
protected $casts = [
'name' => 'array',
'body' => 'array',
'keywords' => 'array',
'descriptions' => 'array',
];
protected static $logName = 'pages';
protected static $logOnlyDirty = true;
protected static $logAttributes = ['name', 'body'];
protected static $submitEmptyLogs = false;
public function getName()
{
return (string) $this->name[app()->getLocale()] ?? null;
}
public function getBody()
{
return (string) $this->body[app()->getLocale()] ?? null;
}
public function getDescriptions()
{
if (App::isLocale('ru')) {
return $this->descriptions['ru'];
}
return $this->descriptions['uz'];
}
public function getKeywords()
{
if (App::isLocale('ru')) {
return $this->keywords['ru'];
}
return $this->keywords['uz'];
}
}