bestmomo/nice-artisan
Composer 安装命令:
composer require bestmomo/nice-artisan
包简介
Web interface for Laravel Artisan
README 文档
README
This package provides a smooth, secure, and insightful web interface for managing and executing your Laravel application's Artisan commands.
Features
Nice Artisan provides a secure and informative way to manage your application's commands:
- Command Catalog & Documentation (New!): Browse all your Laravel core commands and custom commands. Each command now includes integrated documentation, offering a quick, didactic reference right where you need it.
- Dynamic Execution Forms: Automatically generates intuitive form fields for all required arguments and optional options (including checkboxes for flags).
- Real-Time Command Preview: As you fill out the form fields, the full
php artisan ...command is generated and displayed in real-time, ready to be copied to your clipboard. - Favorites System: Mark frequently used commands as favorites for quick access and streamlined workflow.
- History (New!): Keeps the last commands
- Search Functionality: Easily find any command or filter by command type using the built-in search feature.
- Security Focused: Mandatory middleware configuration is required to protect the interface, especially in production environments.
Command Documentation
Command documentation files are located in the resources/commands directory. Any contributions via pull requests to improve this documentation are welcome.
Quick Installation
Add Nice Artisan to your composer.json file :
composer require bestmomo/nice-artisan
It will now be accessible at the following URL:
.../niceartisan
Middleware (security)
If you want to use this package on a production application, you must protect the urls with a middleware for your security !
To add a middleware for the package publish the configuration:
php artisan vendor:publish --tag=niceartisan:config
You can now define your protection logic. Add a route middleware to your application, for example:
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class NiceArtisanProtection
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
// EXAMPLE: Only allow access in 'local' environment
if (app()->isProduction())
{
abort(403, 'Nice Artisan is not allowed in production.');
}
// OR: Check if the user is authenticated and is an admin
// if (! auth()->check() || ! auth()->user()->isAdmin())
// {
// abort(403);
// }
return $next($request);
}
}
Add the middleware to the bootstrap/app.php file:
->withMiddleware(function (Middleware $middleware) {
$middleware->alias([
'niceartisan' => \App\Http\Middleware\NiceArtisan::class,
]);
})
Screenshots
bestmomo/nice-artisan 适用场景与选型建议
bestmomo/nice-artisan 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 155.01k 次下载、GitHub Stars 达 214, 最近一次更新时间为 2015 年 11 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bestmomo/nice-artisan 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bestmomo/nice-artisan 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 155.01k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 216
- 点击次数: 17
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-07

