<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
touhidurabir / laravel-model-soft-cascade example snippets
class User extends Model {
use SoftDeletes;
use HasSoftCascade;
public function cascadable() : array {
return [
'profile', 'posts'
];
}
public function profile() {
return $this->hasOne('Touhidurabir\ModelSoftCascade\Tests\App\Profile');
}
public function posts() {
return $this->hasMany('Touhidurabir\ModelSoftCascade\Tests\App\Post');
}
}