I'm getting data through the 2 table in form of array (like address) and one to find particular pin code in another table here is the 2 model that i'm using to find and match the result and perform the tax function eg. if one table have the array a.b,c,d the second table have the value to find the value store in it eg. if a = 1 if b=2 like that here is my code idea trying to implement but no success
try
{
$toltax = toltax::wheresource('LIKE','%'.$s_address.'%')->get();
$tsource = $toltax->source;
$tdestination = $toltax->destination;
if(!empty($toltax = toltax::where($s_address, 'LIKE' ,"%$tsource%")
->where($d_address,'LIKE',"%$tdestination%")
->get('tax')
)
){
Log::info("toll tax".$toltax->tax);
$Tax = $Tax + $toltax->tax;
}
}catch(ModelNotFoundException $e) {
return false;
}