当前位置: 首页 > 软件库 > Web应用开发 > Web框架 >

laravel-totem

Manage Your Laravel Schedule From A Web Dashboard
授权协议 MIT License
开发语言 PHP
所属分类 Web应用开发、 Web框架
软件类型 开源软件
地区 不详
投 递 者 甄文彬
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Laravel Totem

Build Status

Introduction

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.

Documentation

Compatiblity Matrix

Laravel Totem
8.x 8.x
7.x 7.x
6.x 6.x
5.8 5.x
5.7 4.x
5.6 3.x
5.5 2.x
5.4 1.x

Installing

Totem requires Laravel v5.4 and above, please refer to the above table for compatability. 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
Table Prefix

Totems' tables use generic names which may conflict with existing tables in a project. To alleviate this the .env param TOTEM_TABLE_PREFIX can be set which will apply a prefix to all of Totems tables and their models.

Updating

Please republish totem assets after updating totem to a new version

php artisan totem:assets

Configuration

Cron Job

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
Web Dashboard

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.

Filter Commands Dropdown

By default Totem outputs all Artisan commands on the Create/Edit tasks. To make this dropdown more concise there is a filter config feature that can be set in the totem.php config file.

Example filters

'artisan' => [
    'command_filter' => [
        'stats:*',
        'email:daily-reports'
    ],
],

This feature uses fnmatch syntax to filter displayed commands. stats:* will match all Artisan commands that start with stats: while email:daily-reports will only match the command named email:daily-reports.

This filter can be used as either a whitelist or a blacklist. By default it acts as a whitelist but an option flag can be set to instead act as a blacklist.

'artisan' => [
    'command_filter' => [
        'stats:*',
        'email:daily-reports'
    ],
    'whitelist' => true,
],

If the value of whitelist is false then the filter acts as a blacklist.

'whitelist' => false

Middleware

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.

Making Commands available in Laravel Totem

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.

Command Parameters

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

Console Command

In addition to the dashboard, Totem provides an artisan command to view a list of scheduled task.

php artisan schedule:list

Screenshots

Task List

Task List

Task Details

Task List

Edit Task

Task List

Artisan Command to view scheduled tasks

Task List

Changelog

Important versions listed below. Refer to the Changelog for a full history of the project.

Credits

Bug reports, feature requests, and pull requests can be submitted by following our Contribution Guide.

Contributing & Protocols

License

This software is released under the MIT License.

© 2020 Roshan Gautam, All rights reserved.

 相关资料
  • Laravel 是一套简洁、优雅的PHP Web开发框架(PHP Web Framework)。它可以让你从面条一样杂乱的代码中解脱出来;它可以帮你构建一个完美的网络APP,而且每行代码都可以简洁、富于表达力。 功能特点 1、语法更富有表现力 你知道下面这行代码里 “true” 代表什么意思么? $uri = Uri::create(‘some/uri’, array(), array(), tr

  • 我需要空间/Laravel权限的帮助。当我试图分配它给我错误哎呀,看起来像出了问题。 错误 Connection.php第761行中的QueryExcema:SQLSTATE[23000]:完整性约束冲突:1048列role_id不能为空(SQL:插入到(,)值(9,))

  • Laravel 作为现在最流行的 PHP 框架,其中的知识较多,所以单独拿出来写一篇。 简述 Laravel 的生命周期 Laravel 采用了单一入口模式,应用的所有请求入口都是 public/index.php 文件。 注册类文件自动加载器 : Laravel通过 composer 进行依赖管理,无需开发者手动导入各种类文件,而由自动加载器自行导入。 创建服务容器:从 bootstrap/ap

  • 简介 Laravel Scout 为 Eloquent 模型 全文搜索提供了简单的,基于驱动的解决方案。通过使用模型观察者,Scout 会自动同步 Eloquent 记录的搜索索引。 目前,Scout 自带一个 Algolia 驱动;不过,编写自定义驱动很简单, 你可以轻松的通过自己的搜索实现来扩展 Scout。 安装 首先,通过 Composer 包管理器来安装 Scout: composer

  • 简介 Laravel 致力于让整个 PHP 开发体验变得愉快, 包括你的本地开发环境。 Vagrant 提供了一种简单,优雅的方式来管理和配置虚拟机。 Laravel Homestead 是一个官方预封装的 Vagrant box,它为你提供了一个完美的开发环境,而无需在本地机器安装 PHP 、Web 服务器和其他服务器软件。不用担心会搞乱你的操作系统!Vagrant boxes 是一次性的。如果

  • WebStack-Laravel 一个开源的网址导航网站项目,具备完整的前后台,您可以拿来制作自己的网址导航。 部署 克隆代码: git clone https://github.com/hui-ho/WebStack-Laravel.git 安装依赖: composer installphp artisan key:generate 编辑配置: cp .env.example .env ...D

  • 百度编辑器 For Laravel 5 支持自定义路由, 默认前后台独立控制器,支持重写方法方便自己的业务逻辑处理,支持扩展图片助手(推荐使用Intervention\Image第三方包) 官网 NinJa911工作室. 疑问讨论 请在issue里new一个. 授权 此Laravel 扩展包基于MIT协议开源MIT license. 安装 1.Composer 安装 composer requir

  • laravel-admin是一个基于laravel的后台管理开发框架,能帮助你使用很少的时间和代码量开发出功能完备的管理后台,另外它作为一个三方包,可以和框架内其它项目并行开发,真正做到前后台开发分离。 功能: RBAC权限管理模块。 菜单管理,和权限系统结合。 模型数据表格,能快速构建数据表格,并支持多种模型关系。 模型表单以及30+种form元素组件,自动实现增、删、改功能。 支持本地和云存储