Browse Source

移除多余代码

jqh 5 years ago
parent
commit
363c2df945
1 changed files with 0 additions and 44 deletions
  1. 0 44
      src/Controllers/PermissionController.php

+ 0 - 44
src/Controllers/PermissionController.php

@@ -116,50 +116,6 @@ class PermissionController extends AdminController
         return $tree;
     }
 
-    /**
-     * Make a show builder.
-     *
-     * @param mixed $id
-     *
-     * @return Show
-     */
-    protected function detail($id)
-    {
-        $show = new Show($id, new Permission());
-
-        $show->id;
-        $show->slug;
-        $show->name;
-
-        $show->http_path->unescape()->as(function ($path) {
-            return collect($path)->filter()->map(function ($path) {
-                $method = $this->http_method ?: ['ANY'];
-
-                if (Str::contains($path, ':')) {
-                    [$method, $path] = explode(':', $path);
-                    $method = explode(',', $method);
-                }
-
-                $method = collect($method)->map(function ($name) {
-                    return strtoupper($name);
-                })->map(function ($name) {
-                    return "<span class='label bg-primary'>{$name}</span>";
-                })->implode('&nbsp;');
-
-                if (! empty(config('admin.route.prefix'))) {
-                    $path = '/'.trim(config('admin.route.prefix'), '/').$path;
-                }
-
-                return "<div style='margin-bottom: 5px;'>$method<code>$path</code></div>";
-            })->implode('');
-        });
-
-        $show->created_at;
-        $show->updated_at;
-
-        return $show;
-    }
-
     /**
      * Make a form builder.
      *