Download the PHP package ashraftalha/laravel-opconsole without Composer
On this page you can find all versions of the php package ashraftalha/laravel-opconsole. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ashraftalha/laravel-opconsole
More information about ashraftalha/laravel-opconsole
Files in ashraftalha/laravel-opconsole
Package laravel-opconsole
Short Description Monitor. Diagnose. Maintain. An administrative operations console for Laravel applications: health checks, safe Artisan operations, and a log viewer behind explicit authorization.
License MIT
Homepage https://github.com/ashraftalha/laravel-opconsole
Informations about the package laravel-opconsole
Monitor. Diagnose. Maintain.
An operations console for Laravel: health checks, safe Artisan operations, a security audit and a log viewer, all behind Gates.
๐ Full documentation: https://opconsole.ashraftalha.com/
OpConsole adds one page to your app, /admin/opconsole by default. It answers "is anything wrong?" at a glance, shows the fix for every problem, and lets the right people run maintenance tasks without SSH. It ships its own CSS and JavaScript, needs no build step, and makes no CDN requests.
Start here: 5-minute setup ยท Read-only production ยท 401/403 troubleshooting
No SSH? Check shared-hosting limitations: installation and migrations still need deployment access, and timed browser actions need web-runtime pcntl.
Contents
- What's inside
- Requirements
- Quick start
- Learn more
- Updating
- Testing
What's inside
The console is organised in eight tabs. A header above them shows a 0โ100 health score, the environment badge, and the Laravel and PHP versions.
| Tab | What you get |
|---|---|
| Overview | Overall state with a status bar, summary cards (database, health, log errors, cache, queue, scheduler, disk, security), the issues that need attention with copyable fix commands, runtime status, and recent activity. |
| Health | Every check grouped by area, critical issues first. Filter by status chips or by name, and expand any check to see its current value and fix. Filters stay in the URL (?check_status=), so a shared link opens the same view. |
| Security | Vulnerable Composer packages by severity, a scan-freshness meter, each advisory with a ready-to-copy composer update command, and Laravel configuration warnings. |
| Operations | Maintenance tasks split into a Safe group and a Danger zone. The output of the last run appears first. |
| Failed jobs | The newest failed queue jobs with their queue, failure time and error (never the payload), a filter, and a Retry button per job. |
| History | An audit trail grouped by day: who ran what, when, how long it took, and any error. |
| System | Application, PHP, performance (OPcache, JIT, Xdebug), PHP extensions, server, database, service and cache settings, with production-risk flags, copy buttons, a search box, and "Copy summary for support". |
| Logs | Log file list, an entries-per-hour chart, level and environment filters, search with highlighting, repeat counts, stack traces with your app's frames highlighted, download and delete. |
Screenshots
Health: filter by status, expand any check for its fix |
Operations: safe tasks, a danger zone, and run one migration or all |
Security: advisories by severity, scan freshness |
Logs: hourly chart, filters, repeat counts |
History: audit trail grouped by day |
Failed jobs: errors at a glance, retry one job |
Screenshots use sample data.
Also included:
- Press Ctrl/โ K to jump to any tab, check, operation or log file.
- Use j / k to move through log entries.
- Light and dark themes, with a per-visitor toggle.
- Right-to-left layout for Arabic, Hebrew, Persian and Urdu.
- Works on phones.
- Strict-CSP friendly: no inline
<script>and no inlinestyle=.
Requirements
- PHP 8.3+
- Laravel 12 or 13
- Optional, for browser operations: the web PHP runtime needs the
pcntlfunctions, which enforce the action timeout. Many PHP-FPM builds disable them. Withoutpcntl, everything else works, and the affected operations are disabled with an explanation. See Execution environments. - Optional, for the security audit: Composer 2.4+ and a
composer.lockin your app.
Quick start
1. Install the package
2. Publish the config (optional, but recommended)
3. Create the audit table
4. Open the console
Sign in to your app, then go to https://your-app.test/admin/opconsole.
With APP_ENV=local it works right away. In every other environment, access is denied until you define the Gates below.
5. Allow access in production
Start with a trusted read-only operator. Import Gate at the top of app/Providers/AppServiceProvider.php, then define the Gates inside boot():
This permits dashboard and log-tail access but denies commands, job retries, full log downloads, and log deletion with the default configuration. Keep authorization.action_gates empty for this read-only policy: a mapped Gate for a normal Artisan action can grant execution even when the run Gate denies it. Failed-job retries additionally require the run Gate; see the permission matrix. Log tails may contain sensitive data, so viewing still requires a trusted operator.
When administrators need to execute actions, replace those definitions with a separate operator/admin policy:
The operator remains read-only; the administrator can run enabled actions (including migrations and job retries) and download logs. Log deletion stays disabled until explicitly granted. For an existing role or permission system, use equivalent permission checks instead of email addresses.
6. Start the scheduler and a queue worker (for the heartbeat checks)
That's it.
Need finer permissions? Map individual operations to their own Gates (for example, support staff can clear caches while migrations stay with administrators). See Authentication & Authorization.
Learn more
๐ The full documentation lives at opconsole.ashraftalha.com.
| Topic | What it covers |
|---|---|
| Authentication & Authorization | The four Gates, the fail-closed default, per-operation Gates, read-only users |
| Operations | Every allow-listed operation, its risk, and the safety rules (confirmation, press-and-hold, locks, runtime limits, audit). Run all pending migrations or one at a time |
| Failed jobs & retry | The failed-jobs tab and per-job retry |
| Health checks & alerts | Built-in checks, the health score, and alerts when health changes |
| CLI and JSON health endpoint | opconsole:health for CI and the token-protected endpoint for uptime monitors |
| Security audit | Composer advisory scanning, opconsole:security, stale-result handling |
| Laravel Octane & Swoole | Octane health checks, Reload Octane workers, why timed operations are refused inside Swoole workers |
| Custom health checks | Write your own check with the HealthCheck contract |
| Configuration and environment variables | Every option, including themes, your own Blade layout and a back link |
| Production deployment | Caching, lock stores on multiple servers, the audit policy |
| Security model | How access, CSRF, the command allow-list and output sanitising work |
| Troubleshooting and FAQ | Common problems and questions |
Updating
Composer never changes files you published. If you published any of them earlier:
- Assets:
php artisan vendor:publish --tag=opconsole-assets --force - Views: compare them with the new ones, or re-publish with
--tag=opconsole-views --force. - Config: copy over any new keys from the latest config. Re-publishing with
--forceoverwrites your changes.
See the upgrade guide for version-specific steps.
Testing
Contributing
See CONTRIBUTING.md.
License
MIT. See LICENSE.