1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-25 06:55:05 +01:00

Fix minore

This commit is contained in:
Pek5892 2024-02-16 10:10:17 +01:00
parent b2b39cbff4
commit 5d11a63c18

View File

@ -89,10 +89,10 @@ class Anagrafica extends Model
public static function fromTipo($type)
{
$tipologia = TipoAnagrafica::where('name', $type)->first();
$tipologia = (new TipoAnagrafica())->getByName($type)->id_record;
$anagrafiche = self::whereHas('tipi', function ($query) use ($tipologia) {
$query->where('`an_tipianagrafiche`.`id`', '=', $tipologia->id);
$query->where('an_tipianagrafiche.id', '=', $tipologia->id);
});
return $anagrafiche;