Skip to content

Commit 622bc26

Browse files
committed
separated load and schedule commands
1 parent b12e428 commit 622bc26

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

Providers/Main.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function boot()
3535
$this->loadConfig();
3636
$this->loadDynamicRelationships();
3737
$this->loadCommands();
38+
$this->scheduleCommands();
3839
}
3940

4041
/**
@@ -124,7 +125,15 @@ public function loadDynamicRelationships()
124125
public function loadCommands()
125126
{
126127
$this->commands(\Modules\MyBlog\Console\Inspire::class);
128+
}
127129

130+
/**
131+
* Schedule commands.
132+
*
133+
* @return void
134+
*/
135+
public function scheduleCommands()
136+
{
128137
$this->app->booted(function () {
129138
$schedule_time = config('app.schedule_time', '09:00');
130139

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ This is an example module with beyond CRUD functions for admin and is shown in t
1515

1616
## Features
1717

18-
- [x] API ([provider](Providers/Main.php#L149), [route](Routes/api.php), [controller](Http/Controllers/Api), [transformer](Transformers))
18+
- [x] API ([provider](Providers/Main.php#L158), [route](Routes/api.php), [controller](Http/Controllers/Api), [transformer](Transformers))
1919
- [x] Bulk Actions ([class](BulkActions), [blade](Resources/views/posts/index.blade.php#L27), [vuejs](Resources/assets/js/posts.js))
20-
- [x] Category Type ([provider](Providers/Main.php#L87), [config](Config/type.php), [model](Models/Post.php#L23))
20+
- [x] Category Type ([provider](Providers/Main.php#L88), [config](Config/type.php), [model](Models/Post.php#L23))
2121
- [x] Client Portal
2222
- [x] ~~Contact Type~~
23-
- [x] Console Command ([provider](Providers/Main.php#L124), [class](Console/Inspire.php))
23+
- [x] Console Command ([register](Providers/Main.php#L125), [schedule](Providers/Main.php#L135), [class](Console/Inspire.php))
2424
- [x] CRUD
2525
- [x] Dashboard ([seed](Database/Seeds/Install.php#L20))
2626
- [x] ~~Document Type~~
27-
- [x] Dynamic Relationships ([define](Providers/Main.php#L104), [use](Widgets/PostsByCategory.php#L18))
27+
- [x] Dynamic Relationships ([define](Providers/Main.php#L105), [use](Widgets/PostsByCategory.php#L18))
2828
- [x] Email Templates ([seed](Database/Seeds/Install.php#L21), [content](Resources/lang/en-GB/email_templates.php))
2929
- [x] Exports ([controller](Http/Controllers/Posts.php#L244), [class](Exports))
3030
- [x] Imports ([controller](Http/Controllers/Posts.php#L117), [class](Imports))
@@ -35,7 +35,7 @@ This is an example module with beyond CRUD functions for admin and is shown in t
3535
- [x] Ownership (`created_by` [field](Models/Post.php#L14), [controller](Http/Controllers/Posts.php#L26), [blade](Resources/views/posts/index.blade.php#L54))
3636
- [x] Permissions ([listener](Listeners/FinishInstallation.php#L32))
3737
- [x] Reports ([define](module.json#L13), [report](Reports/PostSummary.php), [listener](Listeners/AddCategoriesToReport.php), [seed](Database/Seeds/Install.php#L22))
38-
- [x] Search String ([provider](Providers/Main.php#L87), [config](Config/search-string.php#L5), [blade](Resources/views/posts/index.blade.php#L24))
38+
- [x] Search String ([provider](Providers/Main.php#L88), [config](Config/search-string.php#L5), [blade](Resources/views/posts/index.blade.php#L24))
3939
- [x] Seeds ([listener](Listeners/FinishInstallation.php#L29), [seeder](Database/Seeds/Install.php))
4040
- [x] Settings ([define](module.json#L27), [use](Http/Controllers/Posts.php#L38))
4141
- [x] Tests ([feature](Tests/Feature))

0 commit comments

Comments
 (0)