rjvim/car

Add Comments, Actions, Reviews to your Laravel App

dev-master 2022-07-10 10:07 UTC

README

You can install the package via composer:

composer require rjvim/car

The package will automatically register itself.

You can publish the migration with:

php artisan vendor:publish --provider="Betalectic\Car\CarServiceProvider" --tag="migrations"
php artisan migrate

You can optionally publish the config file with:

php artisan vendor:publish --provider="Betalectic\Car\CarServiceProvider" --tag="config"

Documentation

comments:

First Initialise the CarComments helper as . $carComments = new CarComments()

add Comment: def: addComment($comment, $module, $user) .
$carComments->addComment($newComment, $module, $user)

  • $module and $user should be model instances.

update Comment: def: updateComment($data, $commentId) .
$carComments->updateComment($newComment, $commentId)

delete Comment: def: deleteComment($commentId) .
$carComments->deleteComment($commentId)

get Comments: def: getComments($module = NULL, $user = NULL) .
$carComments->getComments($module, $user)

License

The MIT License (MIT). Please see License File for more information.