michal78/laravel-tasks
最新稳定版本:1.0.0.3
Composer 安装命令:
composer require michal78/laravel-tasks
包简介
Simple task management for Laravel
README 文档
README
This package provides simple task management for Laravel applications. It is compatible with Laravel versions 8 through 12.
Installation
You can install the package via composer:
composer require michal78/laravel-tasks
Usage
// Add the HasTasks trait to your model use Michal78\Tasks\Traits\HasTasks; class User extends Model { use HasTasks; } // Create a task $user->addTask( [ 'name' => 'My task', 'description' => 'My task description', 'priority' => 2, 'due_date' => now()->addDays(7), ] ); // Get all tasks $user->tasks; // Get all tasks that are not completed $user->tasks()->notCompleted()->get(); // Get all tasks that are completed $user->tasks()->completed()->get(); // Get all tasks that are completed and have a due date in the future $user->tasks()->completed()->future()->get();
Testing (Not implemented yet)
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email michal.skogemann@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-05-30