コード例 #1
0
ファイル: TagsController.php プロジェクト: arcanesoft/blog
 public function restore(Tag $tag)
 {
     self::onlyAjax();
     $this->authorize('blog.tags.update');
     try {
         $tag->restore();
         $message = "The tag {$tag->name} has been successfully restored !";
         Log::info($message, $tag->toArray());
         $this->notifySuccess($message, 'Tag restored !');
         $ajax = ['status' => 'success', 'message' => $message];
     } catch (\Exception $e) {
         $ajax = ['status' => 'error', 'message' => $e->getMessage()];
     }
     return response()->json($ajax);
 }