app/Observers/EventObserver.php
/**
     * Listen to the Entry deleting event.
     *
     * @param Category $category
     * @return void
     */
Listen to the Entry deleting event.
@param Category $category
@return void
Listen to the Entry deleting event . @param Category $category @return void
public function deleting(Category $category)
    {
         $category->teams()->delete();
         $category->allUsers()->delete();
         $category->activities()->delete();
         $category->events()->delete();
         $category->heroes()->delete();
         $category->coaches()->delete();
    }
public function deleting ( Category $ category ) { $ category -> teams ( ) -> delete ( ) ; $ category -> allUsers ( ) -> delete ( ) ; $ category -> activities ( ) -> delete ( ) ; $ category -> events ( ) -> delete ( ) ; $ category -> heroes ( ) -> delete ( ) ; $ category -> coaches ( ) -> delete ( ) ; }
Listen to the Entry deleting event.
Listen to the Entry deleting event .