dimanche 2 juin 2019

Keep getting count(): Parameter must be an array or an object that implements Countable

I have problem while storing data into database. It is saying count(): Parameter must be an array or an object that implements Countable

Here is my code.

$InsertRecords  = new App\Two263;
$InsertRecords->user_id = 1;
$InsertRecords->aca_year = "test";
$InsertRecords->school_id = '1';
$InsertRecords->school_name = '1';
$InsertRecords->prog_code = "1";
$InsertRecords->prog_name = "2";
$InsertRecords->no_stud_appeared = "3";
$InsertRecords->no_stud_passed = "14";
$InsertRecords->save();

Here is my database structure screenshot: http://prntscr.com/nwj0qj

Error screenshot: http://prntscr.com/nwj167

If I attempt to save record, this error comes up. I don't know what it has to do with the count function.

It's been 6 hours I'm trying to figure out this issue. Please help.

Thanks!



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2Mngkw9
via IFTTT

Aucun commentaire:

Enregistrer un commentaire