Skip to content

Commit 3691d77

Browse files
author
songzou
committed
bugfix
1 parent a0bc0e4 commit 3691d77

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

README.md

+15-17
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,37 @@ laravel-admin-ext/scheduling
33

44
A 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

4038
License
4139
------------

src/SchedulingServiceProvider.php

+2
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)