Closed abidkhan484 closed 2 days ago
This is usually because your model doesn't have any defined mediaParams?
If it doesn't then define some mediaParams for the model.
public $mediasParams = [
'cover' => [
'default' => [
[
'name' => 'default',
'ratio' => 16 / 9,
],
],
],
];
This is usually because your model doesn't have any defined mediaParams?
If it doesn't then define some mediaParams for the model.
public $mediasParams = [ 'cover' => [ 'default' => [ [ 'name' => 'default', 'ratio' => 16 / 9, ], ], ], ];
Hi @pauldwight, It's working after adding the attribute in the model. I have 2 observations.
Thanks for the prompt support.
Root Cause: The issue is caused by the initializeHasMetadata method, particularly in the HasMetadata.php section. When the mediasParams are being added, it interferes with the process of adding only the title field, which leads to an error when additional information is missing.
Error Details: The error is triggered when the framework attempts to run a database query, and it expects an array, but a string is provided instead. This happens in the Illuminate/Query/Grammers/Grammer.php file of the Laravel framework.