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