Manage your Laravel Schedule
from a pretty dashboard. Schedule your Laravel Console Commands
to your liking. Enable/Disable scheduled tasks on the fly without going back to your code again.
Laravel | Totem |
---|---|
5.5 | 2.0 |
5.4 | 1.0 |
Totem
requires Laravel v5.4 and above. Use composer to install totem to your Laravel project
composer require studio/laravel-totem
Laravel Totem supports auto package discovery for Laravel v5.5, therefore service provider registration is not required in Laravel v5.5
Add TotemServiceProvider
to the providers
array of your Laravel v5.4 application's config/app.php
Studio\Totem\Providers\TotemServiceProvider::class,
Once Laravel Totem
is installed & registered,
- Run the migration
php artisan migrate
- Publish
Totem
assets to your public folder using the following command
php artisan totem:assets
Please republish totem assets after updating totem to a new version
php artisan totem:assets
This package assumes that you have a good understanding of Laravel's Task Scheduling and Laravel Console Commands. Before any of this works please make sure you have a cron running as follows:
* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1
Laravel Totem
's dashboard is inspired by Laravel Horizon
. Just like Horizon you can configure authentication to Totem
's dashboard. Add the following to the boot method of your AppServiceProvider or wherever you might seem fit.
use Studio\Totem\Totem;
Totem::auth(function($request) {
// return true / false . For e.g.
return Auth::check();
});
By default Totem's dashboard only works in local environment. To view the dashboard point your browser to /totem of your app. For e.g. laravel.dev/totem.
Laravel Totem
uses the default web and api middleware but if customization is required the middleware can be changed by setting the appropriate .env
value. These values can be found in config/totem.php
.
All artisan commands can be scheduled. If you want to hide a command from Totem make sure you have the hidden
attribute set to true in your command. For e.g.
protected $hidden = true;
From L5.5 onwards all commands are auto registered, so this wouldn't be a problem.
If your command requires arguments or options please use the optional command parameters field. You can provide parameters to your command as a string in the following manner
name=john.doe --greetings='Welcome to the new world'
In the example above, name is an argument while greetings is an option
In addition to the dashboard, Totem provides an artisan command to view a list of scheduled task.
php artisan schedule:list
Important versions listed below. Refer to the Changelog for a full history of the project.
- 1.0 - TBD
Bug reports, feature requests, and pull requests can be submitted by following our Contribution Guide.
This software is released under the MIT License.
© 2017 Roshan Gautam, All rights reserved.