Skip to content

Commit

Permalink
Upgrade to filament stable version
Browse files Browse the repository at this point in the history
  • Loading branch information
Hasnayeen committed Aug 4, 2023
1 parent 1f99807 commit e3aa8d8
Show file tree
Hide file tree
Showing 26 changed files with 1,577 additions and 1,467 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ private function getChange()
}
$data = clone $this->result;
$current = (int) $data->where('month', today()->format('Y-m'))->first()?->total_seconds;
$previous = (int) $data->where('month', today()->subMonth()->format('Y-m'))->first()?->total_seconds;
$previous = (int) $data->where('month', today()->subMonthNoOverflow()->format('Y-m'))->first()?->total_seconds;
$change = $current - $previous;
$this->change = ($previous !== 0 && $change !== 0) ? round(($change / $previous) * 100, 2) : 'N/A';

return abs($this->change);
return is_int($this->change) ? abs($this->change) : $this->change;
}

private function getIcon()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Illuminate\Session\Middleware\StartSession;
use Illuminate\View\Middleware\ShareErrorsFromSession;

class AdminContextProvider extends PanelProvider
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
use Illuminate\View\Middleware\ShareErrorsFromSession;
use Illuminate\View\View;

class AppContextProvider extends PanelProvider
class AppPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
Expand Down Expand Up @@ -101,7 +101,7 @@ public function panel(Panel $panel): Panel
])
->sidebarCollapsibleOnDesktop()
->databaseNotifications()
->renderHook('topbar.start', fn (): View => view('filament.app.hooks.welcome_user'))
->renderHook('body.start', fn (): View => view('filament.app.hooks.background'));
->renderHook('panels::topbar.start', fn (): View => view('filament.app.hooks.welcome_user'))
->renderHook('panels::body.start', fn (): View => view('filament.app.hooks.background'));
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"php": "^8.1",
"blade-ui-kit/blade-icons": "^1.5",
"brick/money": "0.8.*",
"filament/filament": "3.x",
"filament/filament": "^3.0",
"guzzlehttp/guzzle": "^7.2",
"laravel/breeze": "^1.20",
"laravel/framework": "^10.8",
Expand Down
Loading

0 comments on commit e3aa8d8

Please sign in to comment.