Fix wrong result type on getById.

This commit is contained in:
kj 2022-03-30 14:09:08 -04:00
parent fe61d14713
commit 9689ac82cf
1 changed files with 3 additions and 2 deletions

View File

@ -701,11 +701,12 @@ class ModelMySQL {
/**
* Obtiene una instancia según su primary key (generalmente id).
* Si no encuentra una instancia, devuelve nulo.
*
* @param mixed $id
* @return ModelMySQL
* @return mixed
*/
public static function getById($id) : ModelMySQL {
public static function getById($id) {
return static::where(static::$primaryKey, $id)->getFirst();
}