File tree 2 files changed +17
-17
lines changed
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
3
3
4
4
A web interface for manage task scheduling in laravel.
5
5
6
+ ## Screenshot
7
+
8
+ ![ wx20170810-101048] ( https://user-images.githubusercontent.com/1479100/29151552-8affc0b2-7db4-11e7-932a-a10d8a42ec50.png )
9
+
6
10
## Installation
7
11
8
12
```
9
13
$ composer require laravel-admin-ext/scheduling
10
14
11
- ```
12
-
13
- Open ` app/Providers/AppServiceProvider.php ` , and call the ` Scheduling::boot ` method within the ` boot ` method:
14
15
15
- ``` php
16
- <?php
16
+ $ php artisan admin:import scheduling
17
+ ```
17
18
18
- namespace App\Providers;
19
+ Open ` http://your-host/admin/scheduling ` .
19
20
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:
22
22
23
- class AppServiceProvider extends ServiceProvider
23
+ ``` php
24
+ class Kernel extends ConsoleKernel
24
25
{
25
- public function boot( )
26
+ protected function schedule(Schedule $schedule )
26
27
{
27
- Scheduling::boot();
28
+ $schedule->command('inspire')->everyTenMinutes();
29
+
30
+ $schedule->command('route:list')->dailyAt('02:00');
28
31
}
29
32
}
30
- ```
31
-
32
- then run:
33
33
34
- ```
35
- $ php artisan admin:import scheduling
36
34
```
37
35
38
- Open ` http://your-host/admin/ scheduling` .
36
+ And you can find these tasks in scheduling panel .
39
37
40
38
License
41
39
------------
Original file line number Diff line number Diff line change @@ -12,5 +12,7 @@ class SchedulingServiceProvider extends ServiceProvider
12
12
public function boot ()
13
13
{
14
14
$ this ->loadViewsFrom (__DIR__ .'/../resources/views ' , 'laravel-admin-scheduling ' );
15
+
16
+ Scheduling::boot ();
15
17
}
16
18
}
You can’t perform that action at this time.
0 commit comments