项目作者: FriendsOfFlarum

项目描述 :
Register custom commands into Flarum
高级语言: PHP
项目地址: git://github.com/FriendsOfFlarum/console.git
创建时间: 2017-07-24T17:44:27Z
项目社区:https://github.com/FriendsOfFlarum/console

开源协议:MIT License

下载


Console

MIT license Latest Stable Version Total Downloads

This package is meant for extension developers and offers the ability to add task scheduling to Flarum.

Use in your extension

The real deal is using it in your own extension. Simply require it in your extension composer.json file:

  1. "require": {
  2. "fof/console": "^0.6"
  3. },

Now make sure the ConsoleProvider is registered inside Flarum. There’s an Extender that helps you with that, inside
your extend.php add:

  1. return [
  2. new \FoF\Console\Extend\EnableConsole,
  3. // .. your code
  4. ];

Task Scheduling, cron jobs

To set a schedule, create a Service Provider which
resolves the Illuminate\Console\Scheduling\Schedule through IoC, then use its methods to configure the schedule
for the command, see the Task Scheduling documentation.