Skip to content

Commit

Permalink
first release
Browse files Browse the repository at this point in the history
  • Loading branch information
vuthaihoc committed Feb 19, 2023
1 parent adcbea5 commit 0f47fb1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 4 additions & 2 deletions routes/phpinfo.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Route::screen('phpinfo', \App\Orchid\Screens\PhpVersionScreen::class)
<?php

\Illuminate\Support\Facades\Route::screen('phpinfo', \OrchidAddon\Screens\PhpinfoScreen::class)
->name('platform.phpinfo')
->breadcrumbs(function (Trail $trail) {
->breadcrumbs(function (\Tabuna\Breadcrumbs\Trail $trail) {
return $trail
->parent('platform.index')
->push("PHP Info");
Expand Down
11 changes: 10 additions & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace OrchidAddon;

use Illuminate\Contracts\Foundation\CachesRoutes;
use Illuminate\Support\Facades\Route;
use Orchid\Platform\Dashboard;

class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
/**
Expand All @@ -12,6 +16,11 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider
public function boot()
{
$this->loadViewsFrom(__DIR__.'/../views', 'orchid_addon');
$this->loadRoutesFrom(__DIR__.'/../routes/phpinfo.php');
if (! ($this->app instanceof CachesRoutes && $this->app->routesAreCached())) {
Route::domain((string) config('platform.domain'))
->prefix(Dashboard::prefix('/'))
->middleware(config('platform.middleware.private'))
->group(__DIR__.'/../routes/phpinfo.php');
}
}
}

0 comments on commit 0f47fb1

Please sign in to comment.