Hi all, I have the ‘property of non-object’ error in the following controller:
public function actionCreate()
{
$model = new Announcements();
if ($model->load(Yii::$app->request->post()))
{
$imageName = $model->announcement_title;
$model->file = UploadedFile::getInstance($model,'file');
// Error Line >> $model->announcement_image = $imageName.'.'.$model->file->extension;
$model->save();
I use the same upload process that works for products and I’m very challenged as to figuring out where I am not consistent in the process. If you need for me to provide table structure data or any other information, I will be glad to do so.
Thanks