sections fix

This commit is contained in:
merdan 2020-03-06 16:29:29 +05:00
parent 6e527418b6
commit ae9081af3a
1 changed files with 10 additions and 0 deletions

View File

@ -4,6 +4,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Backpack\CRUD\CrudTrait;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Str;
class Section extends Model
@ -68,6 +69,15 @@ class Section extends Model
| MUTATORS
|--------------------------------------------------------------------------
*/
public function getSectionNoAttribute(){
return $this->{'section_no_'.Config::get('app.locale')};
}
public function getDescriptionAttribute(){
return $this->{'description_'.Config::get('app.locale')};
}
public function setSectionImageAttribute($value){
$attribute_name = "section_image";
$disk = config('filesystems.default'); // or use your own disk, defined in config/filesystems.php