├── .gitignore ├── LICENSE ├── README.md ├── composer.json ├── resources └── views │ └── index.blade.php ├── routes └── web.php └── src ├── ComposerViewer.php ├── ComposerViewerServiceProvider.php └── Http └── Controllers └── ComposerViewerController.php /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | phpunit.phar 3 | /vendor 4 | composer.phar 5 | composer.lock 6 | *.project 7 | .idea/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Jens Segers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Composer Viewer for Laravel-admin 2 | 3 | A web interface of composer packages in laravel. 4 | 5 | ## Screenshot 6 | 7 |  8 | 9 | ## Installation 10 | 11 | > Before you install, make sure PHP exec() function is enabled in your php.ini config file. 12 | 13 | ```bash 14 | composer require jxlwqq/composer-viewer 15 | # If you want to add a link entry in the left menu, use the following command to import 16 | php artisan admin:import composer-viewer 17 | ``` 18 | 19 | ## Configuration 20 | 21 | In the extensions section of the config/admin.php file, add configurations 22 | 23 | ```php 24 | 'extensions' => [ 25 | 'composer-viewer' => [ 26 | // Set this to false if you want to disable this extension 27 | 'enable' => true, 28 | // Set the location of composer command 29 | 'which-composer' => '/usr/local/bin/composer', // !! it's important !! 30 | ] 31 | ] 32 | ``` 33 | 34 | ## Usage 35 | Open http://your-host/admin/composer-viewer 36 | 37 | And you can find these installed packages. 38 | 39 | ## More resources 40 | 41 | [Awesome Laravel-admin](https://github.com/jxlwqq/awesome-laravel-admin) 42 | 43 | ## License 44 | 45 | Licensed under [The MIT License (MIT)](LICENSE). 46 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jxlwqq/composer-viewer", 3 | "description": "Composer Viewer for Laravel-admin", 4 | "type": "library", 5 | "keywords": ["laravel-admin", "extension"], 6 | "homepage": "https://github.com/jxlwqq/composer-viewer", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "jxlwqq", 11 | "email": "jxlwqq@gmail.com" 12 | } 13 | ], 14 | "require": { 15 | "php": ">=7.0.0", 16 | "encore/laravel-admin": "~1.6" 17 | }, 18 | "require-dev": { 19 | "phpunit/phpunit": "~6.0" 20 | }, 21 | "autoload": { 22 | "psr-4": { 23 | "Jxlwqq\\ComposerViewer\\": "src/" 24 | } 25 | }, 26 | "extra": { 27 | "laravel": { 28 | "providers": [ 29 | "Jxlwqq\\ComposerViewer\\ComposerViewerServiceProvider" 30 | ] 31 | 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /resources/views/index.blade.php: -------------------------------------------------------------------------------- 1 |
# | 7 |Package name | 8 |Current version | 9 |Latest version | 10 |Latest status | 11 |Description | 12 |
---|---|---|---|---|---|
{{ $index+1 }}. | 16 |{{$package['name']}} | 17 |{{$package['version']}} | 18 |{{ $package['latest'] }} | 19 |{{ $package['latest-status'] }} | 20 |{{ $package['description'] }} | 21 |