Modifications on Delete. Ajout orientation

This commit is contained in:
Cassandre Cantet 2017-10-30 02:42:36 +01:00
parent b15ab7fd07
commit 1a9007428e
2 changed files with 2 additions and 2 deletions

View File

@ -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');
}); });
} }

View File

@ -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()