Closed prokarm19 closed 5 years ago
@prokarm19 Please send the issue formated well. Please add this information:
@prokarm19 Due to the time that has passed without receiving an answer, I proceed to close the issue. In case it keeps happening you can reopen it at any time with the information we request.
thank you beforehand ! i have defined all the process which you have told but still it is not cascading the softdelete i have parent model <?php
namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use \Askedio\SoftCascade\Traits\SoftCascadeTrait;
class File extends Model { use SoftDeletes; protected $primaryKey = 'F_id'; protected $dates = ['deleted_at']; protected $softCascade = ['entries','Countries'];
public function entries(){ return $this->hasMany('App\Range'); }
public function Countries(){ return $this->hasMany('App\Country'); } }
the child model are::
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use \Askedio\SoftCascade\Traits\SoftCascadeTrait;
class Range extends Model { use SoftDeletes; protected $primaryKey = 'Per_id'; protected $dates = ['deleted_at']; protected $softCascade = ['prihscodes'];
}
public function principleTrash($id){ $delete_file= File::find($id); $delete_file->where('F_id',$id)->first()->delete(); return redirect()->back(); }