rjvim / car
为您的Laravel应用添加评论、操作、评价
dev-master
2022-07-10 10:07 UTC
Requires (Dev)
- orchestra/testbench: ~3.7.0
- phpunit/phpunit: ^7.4
This package is auto-updated.
Last update: 2024-09-19 22:18:03 UTC
README
您可以通过composer安装此包
composer require rjvim/car
包将自动注册自己。
您可以使用以下命令发布迁移
php artisan vendor:publish --provider="Betalectic\Car\CarServiceProvider" --tag="migrations"
php artisan migrate
您可以选择使用以下命令发布配置文件
php artisan vendor:publish --provider="Betalectic\Car\CarServiceProvider" --tag="config"
文档
评论
首先初始化CarComments助手作为 . $carComments = new CarComments()
添加评论: def: addComment($comment, $module, $user)
.
$carComments->addComment($newComment, $module, $user)
- $module和$user应该是模型实例。
更新评论: def: updateComment($data, $commentId)
.
$carComments->updateComment($newComment, $commentId)
删除评论: def: deleteComment($commentId)
.
$carComments->deleteComment($commentId)
获取评论: def: getComments($module = NULL, $user = NULL)
.
$carComments->getComments($module, $user)
许可证
MIT许可证。请参阅许可证文件以获取更多信息。