Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Projects extends Model implements Auditable
- {
- use SoftDeletes;
- use OwenItAuditingAuditable;
- protected $fillable = [
- 'name', 'active'
- ];
- public function boards(){
- return $this->belongsTo(Board::class);
- }
- }
- class Board extends Model
- {
- protected $guarded = [];
- public function projects(){
- return $this->hasMany(Projects::class);
- }
- }
- $board->projects()->delete()
Add Comment
Please, Sign In to add comment