Open
Description
Hi,
I am having trouble getting the laravel-scorm
package version 4
to work. An exception is thrown when using the sample code to upload a scorm archive.
Code used:
public function store(ScormRequest $request)
{
try {
$scorm = $this->scormManager->uploadScormArchive($request->file('file'));
// handle scorm runtime error msg
} catch (InvalidScormArchiveException | StorageNotFoundException $ex) {
return $this->respondCouldNotCreateResource(trans('scorm.' . $ex->getMessage()));
}
// response helper function from base controller reponse json.
return $this->respond(ScormModel::with('scos')->whereUuid($scorm['uuid'])->first());
}
The error I am receiving:
"SQLSTATE[HY000]: General error: 1364 Field 'courses_type' doesn't have a default value (SQL: insert into `scorm` (`uuid`, `title`, `version`, `entry_url`, `identifier`, `origin_file`, `updated_at`, `created_at`) values (af86ad2b-4608-4e79-aed2-f15fe32c81b2, Providing Exceptional Customer Service, scorm_12, scormdriver/indexAPI.html, rY3oYmJ0tP1sRwP9mqSHdXYWZXav93-g9N-8RhEs, use-this-scorm.zip, 2022-11-23 12:46:20, 2022-11-23 12:46:20))"
I assume the library is working, but documentation is missing on how to link the relation.
Metadata
Metadata
Assignees
Labels
No labels