File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -3,39 +3,37 @@ laravel-admin-ext/scheduling
33
44A web interface for manage task scheduling in laravel.
55
6+ ## Screenshot
7+
8+ ![ wx20170810-101048] ( https://user-images.githubusercontent.com/1479100/29151552-8affc0b2-7db4-11e7-932a-a10d8a42ec50.png )
9+
610## Installation
711
812```
913$ composer require laravel-admin-ext/scheduling
1014
11- ```
12-
13- Open ` app/Providers/AppServiceProvider.php ` , and call the ` Scheduling::boot ` method within the ` boot ` method:
1415
15- ``` php
16- <?php
16+ $ php artisan admin:import scheduling
17+ ```
1718
18- namespace App\Providers;
19+ Open ` http://your-host/admin/scheduling ` .
1920
20- use Encore\Admin\Scheduling\Scheduling;
21- use Illuminate\Support\ServiceProvider;
21+ Try to add a scheduling task in ` app/Console/Kernel.php ` like this:
2222
23- class AppServiceProvider extends ServiceProvider
23+ ``` php
24+ class Kernel extends ConsoleKernel
2425{
25- public function boot( )
26+ protected function schedule(Schedule $schedule )
2627 {
27- Scheduling::boot();
28+ $schedule->command('inspire')->everyTenMinutes();
29+
30+ $schedule->command('route:list')->dailyAt('02:00');
2831 }
2932}
30- ```
31-
32- then run:
3333
34- ```
35- $ php artisan admin:import scheduling
3634```
3735
38- Open ` http://your-host/admin/ scheduling` .
36+ And you can find these tasks in scheduling panel .
3937
4038License
4139------------
Original file line number Diff line number Diff line change @@ -12,5 +12,7 @@ class SchedulingServiceProvider extends ServiceProvider
1212 public function boot ()
1313 {
1414 $ this ->loadViewsFrom (__DIR__ .'/../resources/views ' , 'laravel-admin-scheduling ' );
15+
16+ Scheduling::boot ();
1517 }
1618}
You can’t perform that action at this time.
0 commit comments