V2, better design, more functionalities.
This commit is contained in:
@@ -16,4 +16,13 @@ class Education extends Model implements HasMedia
|
||||
'einddatum',
|
||||
'beschrijving',
|
||||
];
|
||||
|
||||
public function image()
|
||||
{
|
||||
return $this->getFirstMedia('image');
|
||||
}
|
||||
public function imageUrl()
|
||||
{
|
||||
return $this->image() ? $this->image()->getUrl() : null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,13 @@ class Personalia extends Model
|
||||
protected $casts = [
|
||||
'hidden' => 'boolean',
|
||||
];
|
||||
|
||||
public function image()
|
||||
{
|
||||
return $this->getFirstMedia('image');
|
||||
}
|
||||
public function imageUrl()
|
||||
{
|
||||
return $this->image() ? $this->image()->getUrl() : null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,5 +11,14 @@ class Skill extends Model implements HasMedia
|
||||
{
|
||||
use InteractsWithMedia;
|
||||
|
||||
protected $fillable = ['title', 'description', 'rating'];
|
||||
protected $fillable = ['title', 'description', 'rating', 'type'];
|
||||
|
||||
public function image()
|
||||
{
|
||||
return $this->getFirstMedia('image');
|
||||
}
|
||||
public function imageUrl()
|
||||
{
|
||||
return $this->image() ? $this->image()->getUrl() : null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,5 +18,14 @@ class WorkExperience extends Model implements HasMedia
|
||||
'beschrijving',
|
||||
];
|
||||
|
||||
public function image()
|
||||
{
|
||||
return $this->getFirstMedia('image');
|
||||
}
|
||||
public function imageUrl()
|
||||
{
|
||||
return $this->image() ? $this->image()->getUrl() : null;
|
||||
}
|
||||
|
||||
// Als je mediaconversies of image handling wil: hier kun je die later toevoegen
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user