Modifications on Delete. Ajout orientation
This commit is contained in:
parent
b15ab7fd07
commit
1a9007428e
|
@ -20,7 +20,7 @@ class CreateAssociateImages extends Migration
|
|||
$table->integer('relation_id');
|
||||
$table->integer('position')->nullable();
|
||||
|
||||
$table->foreign('image_id')->references('id')->on('images');
|
||||
$table->foreign('image_id')->references('id')->on('images')->onDelete('cascade');
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ class Image extends Model
|
|||
|
||||
public function setContentAttribute($content)
|
||||
{
|
||||
$this->_content = app('image')->make($content);
|
||||
$this->_content = app('image')->make($content)->orientate();
|
||||
}
|
||||
|
||||
public function getHashAttribute()
|
||||
|
|
Loading…
Reference in New Issue