Closed fibis closed 6 years ago
find() is a static function while findByClientID() is not. You could try the following, but maybe it should be defined as a static function instead $task = new Task; $tasks = $task->findByClientID(12);
Thanks for your suggestion. I tried it but I get still this error:
Fatal error: Uncaught Exception: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1
It seems to be an error in the route to get the data.
I've checked in a fix for this and created a new release.
It should now work using Task::findByClientId(12)
Note: it's been changed to a lower case 'd' in Id.
I tried to get all tasks for a client via the API with
$tasks = Task::findByClientID(12);
. I get this error:Is there a fix for the problem?