File tree Expand file tree Collapse file tree 5 files changed +12
-30
lines changed
Expand file tree Collapse file tree 5 files changed +12
-30
lines changed Original file line number Diff line number Diff line change 22
33namespace App \Http \Controllers ;
44
5- use Illuminate \Support \Facades \Artisan ;
65use Yaza \LaravelGoogleDriveStorage \Gdrive ;
76
87class BackupActions extends Controller
@@ -20,22 +19,4 @@ public function downloadBackup(string $filename)
2019 'Content-disposition ' => 'attachment; filename=" ' .$ filename .'" ' , // force download?
2120 ]);
2221 }
23-
24- public function cleanBackup ()
25- {
26- dispatch (function () {
27- Artisan::call ('simpede:backup clean ' );
28- })->name ('Clean Backup ' );
29-
30- return redirect ()->back ()->with ('status ' , 'Backup cleaning processed in background. ' );
31- }
32-
33- public function createBackup ()
34- {
35- dispatch (function () {
36- Artisan::call ('simpede:backup create ' );
37- })->name ('Create Backup ' );
38-
39- return redirect ()->back ()->with ('status ' , 'Backup creation processed in background. ' );
40- }
4122}
Original file line number Diff line number Diff line change 33namespace App \Nova \Dashboards ;
44
55use App \Helpers \Helper ;
6- use App \Nova \Metrics \Rapat ;
7- use App \Nova \Metrics \Deadline ;
86use App \Nova \Metrics \Kegiatan ;
9- use Laravelwebdev \Welcome \Welcome ;
10- use Laravelwebdev \NovaQuotes \NovaQuotes ;
117use Laravel \Nova \Dashboards \Main as Dashboard ;
8+ use Laravelwebdev \NovaQuotes \NovaQuotes ;
9+ use Richardkeep \NovaTimenow \NovaTimenow ;
1210
1311class Main extends Dashboard
1412{
@@ -37,9 +35,16 @@ public function cards()
3735 NovaQuotes::make ()
3836 ->greetings (__ ('Welcome Back! ' ))
3937 ->user (auth ()->user ()->name ?? 'Guest ' )
40- ->width ('full ' )
38+ ->width ('2/3 ' )
4139 ->description ('Role: ' .implode (', ' , $ values ))
4240 ->render (),
41+ NovaTimenow::make ()
42+ ->width ('1/3 ' )
43+ ->timezones ([
44+ 'Asia/Pontianak ' ,
45+ 'Asia/Makassar ' ,
46+ 'Asia/Jayapura ' ,
47+ ])->defaultTimezone (config ('app.timezone ' )),
4348 Kegiatan::make ('Deadline ' )
4449 ->emptyText ('Tidak ada deadline ' )
4550 ->width ('1/3 ' ),
Original file line number Diff line number Diff line change @@ -57,8 +57,7 @@ public function calculate(NovaRequest $request): array
5757 ->subtitle ('Created: ' .$ backup ['date ' ].', Size: ' .$ backup ['size ' ])
5858 ->actions (fn () => [
5959 MenuItem::externalLink ('Download ' , config ('app.url ' ).config ('nova.path ' ).'/backup/download ' .basename ($ backup ['path ' ])),
60- MenuItem::externalLink ('Create Backup ' , config ('app.url ' ).config ('nova.path ' ).'/backup/create ' ),
61- MenuItem::externalLink ('Clean Backup ' , config ('app.url ' ).config ('nova.path ' ).'/backup/clean ' ),
60+
6261 ]);
6362 }
6463
Original file line number Diff line number Diff line change 4242 "pekhota/nova-scroll-buttons" : " *" ,
4343 "phpoffice/phpword" : " ^1.2" ,
4444 "rap2hpoutre/fast-excel" : " ^5.5" ,
45+ "richardkeep/nova-timenow" : " ^3.0" ,
4546 "sentry/sentry-laravel" : " *" ,
4647 "spatie/laravel-backup" : " ^9.3" ,
4748 "sweetalert2/laravel" : " ^0.1.0" ,
Original file line number Diff line number Diff line change 2020 ->name ('dump-download ' );
2121 Route::get ('/backup/download/{filename} ' , [BackupActions::class, 'downloadBackup ' ])
2222 ->name ('backup-download ' );
23- Route::get ('/backup/clean ' , [BackupActions::class, 'cleanBackup ' ])
24- ->name ('backup-clean ' );
25- Route::get ('/backup/create ' , [BackupActions::class, 'createBackup ' ])
26- ->name ('backup-create ' );
2723 });
2824
2925Route::middleware ([ValidateAccessToken::class])
You can’t perform that action at this time.
0 commit comments