'date' ]; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'bea_code', 'batch_code', 'last_audit_date' ]; // * METHODS /** * Get Bea using cafel lot code * * @param integer $codeLotCafel * @return self|null */ public static function whereCodeLotCafel(int $codeLotCafel): ?self { return Cache::remember("beaCafel$codeLotCafel", 5, function () use ($codeLotCafel) { return self::where( 'batch_code', 'LIKE', '%' . \filter_var($codeLotCafel, \FILTER_SANITIZE_STRING) . '/%' )->first(); }); } }