This commit is contained in:
salam committed 2025-10-31 15:38:20 +01:00
1 parent 30563ee98d
commit 622b37bb90
12 files changed
+56 -56

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ProjektMerkmale extends Model
{
protected $fillable = [
'projekte_id',
'code',
'name',
];
public static function getfreecode($projekte_id)
{
$possible = range('a', 'j');
$have = static::getModel()::where('projekte_id', $projekte_id)->pluck('code')->toArray();
$left = array_diff($possible, $have);
return array_shift($left) ?? false;
}
}