| Install | |
|---|---|
composer require onamfc/laravel-devlogger-dashboard |
|
| Latest Version: | v1.0.1 |
| PHP: | ^8.1 |
A beautiful, feature-rich dashboard for managing Laravel DevLogger records with IDE integration and advanced filtering capabilities.
onamfc/laravel-devlogger package composer require onamfc/laravel-devlogger-dashboard
php artisan vendor:publish --tag=devlogger-dashboard-config
php artisan vendor:publish --tag=devlogger-dashboard-views
php artisan vendor:publish --tag=devlogger-dashboard-assets
The package configuration is located at config/devlogger-dashboard.php. Key configuration options include:
'allowed_environments' => [
'local',
'staging',
'development'
],
'require_auth' => env('DEVLOGGER_DASHBOARD_AUTH', true),
'authorization_gate' => env('DEVLOGGER_DASHBOARD_GATE', null),
'allowed_ips' => env('DEVLOGGER_DASHBOARD_IPS') ? explode(',', env('DEVLOGGER_DASHBOARD_IPS')) : [],
'ide' => [
'default' => env('DEVLOGGER_IDE', 'vscode'),
'handlers' => [
'vscode' => 'vscode://file/{file}:{line}',
'phpstorm' => 'phpstorm://open?file={file}&line={line}',
'sublime' => 'subl://open?url=file://{file}&line={line}',
'atom' => 'atom://core/open/file?filename={file}&line={line}',
]
],
Add these to your .env file:
# Dashboard Configuration
DEVLOGGER_DASHBOARD_PREFIX=devlogger
DEVLOGGER_DASHBOARD_AUTH=true
DEVLOGGER_DASHBOARD_GATE=null
DEVLOGGER_DASHBOARD_IPS=
# IDE Configuration
DEVLOGGER_IDE=vscode
DEVLOGGER_BASE_PATH=/path/to/your/project
DEVLOGGER_SHOW_FILE_PREVIEW=true
# UI Configuration
DEVLOGGER_THEME=dark
DEVLOGGER_BRAND_NAME="DevLogger Dashboard"
DEVLOGGER_AUTO_REFRESH=false
Once installed, visit /devlogger in your browser (or your configured route prefix). The dashboard will only be accessible in allowed environments and to authenticated users.
vscode://file/path/to/file:line URLsphpstorm://open?file=path&line=number URLsConfigure your IDE to handle custom URL schemes, or use the "Copy Path" button as a fallback.
You can create a custom authorization gate to control dashboard access:
// In your AuthServiceProvider
Gate::define('access-devlogger-dashboard', function ($user) {
return $user->hasRole('developer') || $user->email === 'admin@example.com';
});
Then set in your .env:
DEVLOGGER_DASHBOARD_GATE=access-devlogger-dashboard
The package includes DevLoggerDashboardMiddleware which handles:
You can extend or replace this middleware by binding your own implementation.
Publish the views to customize the UI:
php artisan vendor:publish --tag=devlogger-dashboard-views
Views will be published to resources/views/vendor/devlogger-dashboard/.
The dashboard uses Tailwind CSS with a custom configuration. You can override styles by publishing the views and modifying the templates.
You can extend the Livewire components to add custom functionality:
// Create your own component extending the base
class CustomLogDashboard extends \Onamfc\DevLoggerDashboard\Http\Livewire\LogDashboard
{
public function customAction()
{
// Your custom logic here
}
}
Handles IDE URL generation:
$ideService = app(\Onamfc\DevLoggerDashboard\Services\IdeService::class);
$url = $ideService->generateIdeUrl('/path/to/file.php', 123);
Handles file preview generation:
$fileService = app(\Onamfc\DevLoggerDashboard\Services\FileService::class);
$preview = $fileService->getFilePreview('/path/to/file.php', 123, 10);
show_preview configurationContributions are welcome! Please feel free to submit a Pull Request.
This package is open-sourced software licensed under the MIT license.
If you encounter any issues or have questions, please open an issue on the GitHub repository.