how to specify which user gets deactivated in PHP, Laravel framework -


firstly have apologize if tittle off subject, wasn't finding better explanation it.

anyway, trying algorithm website checks if there 0 available projects @ client.

client(id: 1) can have infinite number of objects. client(id: 1) state active. if projects of client(id: 1) set inactive. client should set inactive too.

i tried enter algorithm in helpers.php like:

function checkclientaccounts(client $client, $action){      $activeprojects = project::all()->where('is_active', '1')->count();      if($activeprojects == 0){         $client->changeactivestate($action);      }else{         //do nothing     } 

but not understanding initialize or how make of work. i've goodled past hour nothing, suggestion?


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -