public function defaultTemplate() { $defaultNotification = NotificationTemplate::find($this->default_id); return $defaultNotification; }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($userId, $templateId) { $not = NotificationTemplate::find($templateId); if ($not) { $not->delete(); } }