Initial commit

This commit is contained in:
2026-09-03 12:21:17 +02:00
commit 6d40da0410
155 changed files with 21554 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/** Silnik - katalog (legacy site204). Tabela seg_engines (database-first). */
class Engine extends Model
{
protected $connection = 'softspm';
protected $table = 'seg_engines';
protected $primaryKey = 'ENG_ID';
public $timestamps = false;
protected $guarded = [];
public function manufacturer(): BelongsTo
{
return $this->belongsTo(Manufacturer::class, 'ENG_MCF_ID', 'MCF_ID');
}
/** Tylko widoczne (ENG_STATUS='1'). */
public function scopeVisible(Builder $q): Builder
{
return $q->where('ENG_STATUS', '1');
}
}