{"id":19417031,"url":"https://github.com/tanwencn/supervisor","last_synced_at":"2025-08-21T07:15:45.654Z","repository":{"id":41585180,"uuid":"322569361","full_name":"tanwencn/supervisor","owner":"tanwencn","description":"Laravel Supervisor 方便的输出任何你想监控的行为记录。","archived":false,"fork":false,"pushed_at":"2024-06-12T09:44:44.000Z","size":7037,"stargazers_count":10,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-03T00:06:34.155Z","etag":null,"topics":["laravel-logs","laravel-supervisor","supervisor"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanwencn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-18T10:59:23.000Z","updated_at":"2024-03-18T01:24:07.000Z","dependencies_parsed_at":"2025-04-24T13:48:57.272Z","dependency_job_id":null,"html_url":"https://github.com/tanwencn/supervisor","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/tanwencn/supervisor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanwencn%2Fsupervisor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanwencn%2Fsupervisor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanwencn%2Fsupervisor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanwencn%2Fsupervisor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanwencn","download_url":"https://codeload.github.com/tanwencn/supervisor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanwencn%2Fsupervisor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271442137,"owners_count":24760353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel-logs","laravel-supervisor","supervisor"],"created_at":"2024-11-10T13:06:43.730Z","updated_at":"2025-08-21T07:15:45.609Z","avatar_url":"https://github.com/tanwencn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Supervisor\n## 介绍\n\nSupervisor 为你的 Laravel 文件提供了一个美观的可视化列表， 可以方便的显示出基于Filesystem和Db的数据。\n\n对于Filesystem模型，默认提供了```Laravel日志```、```Json```、```正则表达式```解析器以解析不同需求的文件内容。\n\n所有的配置存储在一个简单的配置文件中，你可以方便的对其进行源码控制。\n\n![image](https://user-images.githubusercontent.com/12136184/130049625-74e631d1-02c7-4669-b2a5-8e34bee1a7a9.png)\n\n## 安装\n\n可以使用 Composer 将 Horization 安装到你的 Laravel 项目里：\n\n```bash\ncomposer require tanwencn/supervisor\n```\n\n```bash\nphp artisan supervisor:install\n```\n\n```Supervisor```的默认配置显示项为```filesystem.logs```。所以还需要在 ```config/filesystems.php``` 中添加 ```disks``` ：\n```php\n'logs' =\u003e [\n            'driver' =\u003e 'local',\n            'root' =\u003e storage_path('logs'),\n        ]\n```\n\n### 配置\n\n```Supervisor``` 资源发布之后，他的主要配置文件会被分配到 ```config/supervisor.php``` 文件。可以用这个配置文件配置工作选项。\n\n在配置文件中，```resolvers```项默认提供了Laravel日志解析配置，还有```Json```、```正则表达式```、```mysql```解析配置示例，你只要稍微对其进行改动，就可以直接用在你的应用中了。\n\n注意```resolvers```只是解析配置项，要在视图中显示，需要把其添加进```view```项中。\n\n### 访问授权\n\n```Supervisor``` 在 ```/supervisor``` 路径上显示了一个视图面板。默认情况下，你只能在 ```local``` 环境中访问这个面板。在你的 ```App/Providers/AppServiceProvider.php``` 文件中添加 ```gate``` 方法来控制着在非本地环境中对 ```Supervisor``` 的访问：\n\n```php\npublic function boot()\n{\n    $this-\u003egateSupervisor();\n}\n\nprotected function gateSupervisor()\n{\n    Gate::define('viewSupervisor', function ($user) {\n        return in_array($user-\u003ename, [\n            'tanwencn',\n        ]);\n    });\n}\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanwencn%2Fsupervisor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanwencn%2Fsupervisor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanwencn%2Fsupervisor/lists"}