mardi 27 juin 2023

How to Count Data from Another Function

I have a trouble from my controller. When i want to count the array from another function in controller is get a error cannot to count

I get this error

Call to a member function get() on array

This my controller :

Function A
public function detailFees(){
$dataArray = array(
    'datapayment' => $datapayment,
    'countafter' => $countafter,
    'countbefore' => $countbefore
  );
}

Function B
public function data(){
$data = count($this->detailFees($market)->get(datapayment))
}

I want to count just array data in datapayment with result in number

Thanks for help!



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/cSiaqYR
via IFTTT

Aucun commentaire:

Enregistrer un commentaire