当我使用以下语法删除行时:
$user->delete();
有没有办法附加各种回调,所以它会自动执行此操作:
$this->photo()->delete();
最好在模型类内.
php laravel
laravel ×1
php ×1