Skip to content

Commit

Permalink
BaseModel Update
Browse files Browse the repository at this point in the history
  • Loading branch information
nasirkhan committed May 20, 2024
1 parent 68657c2 commit 2692578
Showing 1 changed file with 7 additions and 32 deletions.
39 changes: 7 additions & 32 deletions app/Models/BaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function getTableColumns()
break;
}

return $columns;
return json_decode(json_encode($columns));
}

/**
Expand Down Expand Up @@ -113,7 +113,7 @@ public function getStatusLabelAttribute()
}

/**
* Get Status Label.
* Get Status Label as text.
*/
public function getStatusLabelTextAttribute()
{
Expand Down Expand Up @@ -162,6 +162,11 @@ public function setSlugAttribute($value)
}
}

/**
* Boot the model and attach event listeners.
*
* @return void
*/
protected static function boot()
{
parent::boot();
Expand Down Expand Up @@ -204,36 +209,6 @@ public function setMetaTitleAttribute($value)
}
}

// /**
// * Set the 'meta description'
// * If no value submitted use the default 'meta_description'.
// *
// * @param [type]
// */
// public function setMetaDescriptionAttribute($value)
// {
// $this->attributes['meta_description'] = $value;

// if (empty($value)) {
// $this->attributes['meta_description'] = setting('meta_description');
// }
// }

// /**
// * Set the 'meta description'
// * If no value submitted use the default 'meta_description'.
// *
// * @param [type]
// */
// public function setMetaKeywordAttribute($value)
// {
// $this->attributes['meta_keyword'] = $value;

// if (empty($value)) {
// $this->attributes['meta_keyword'] = setting('meta_keyword');
// }
// }

/**
* Set the meta meta_og_image
* If no value submitted use the 'Title'.
Expand Down

0 comments on commit 2692578

Please sign in to comment.