Modifications on Delete. Ajout orientation
This commit is contained in:
@@ -20,7 +20,7 @@ class CreateAssociateImages extends Migration
|
|||||||
$table->integer('relation_id');
|
$table->integer('relation_id');
|
||||||
$table->integer('position')->nullable();
|
$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)
|
public function setContentAttribute($content)
|
||||||
{
|
{
|
||||||
$this->_content = app('image')->make($content);
|
$this->_content = app('image')->make($content)->orientate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getHashAttribute()
|
public function getHashAttribute()
|
||||||
|
|||||||
Reference in New Issue
Block a user