artincms / laravel_comments_system
Official ArtinCMS.com Laravel Comment Systems Package
dev-master
2020-02-13 07:00 UTC
Requires
- artincms/laravel_morphable_manager: dev-master
- yajra/laravel-datatables-oracle: >=9.0
This package is auto-updated.
Last update: 2025-03-13 18:09:12 UTC
README
laravel comments system is a laravel package .in frontend template use vue js that provides user interfaces inviroment. .
Requiments
- PHP >= 7.0
- Laravel 5.5|5.6
Installation
Quick installation
composer require artincms/laravel_comment_system
publish vendor
$ php artisan vendor:publish --provider=ArtinCMS\LCS\LCSServiceProviderif update package for publish vendor you should run :
$ php artisan vendor:publish --provider=ArtinCMS\LCS\LCSServiceProvider --force
migrate tabales
$ php artisan migrate
publish seed
```apple js php artisan db:seed --class="ArtinCMS\LCS\Database\Seeds\LmmMorphableTableSeeder" ``` in all category you want use laravel comment system you should fill lmm_morphable table . forexample if you want use this package for article you should fill lmm_morphable as bellow :pck_name | dev_name | name | model_name | target_column_name | target_column_alias | generate_url_func |
---|---|---|---|---|---|---|
article | article_model | مقالات | App\Article | title | عنوان | comment_url |
usage
for use this package you should use bellow helper function anywhere in your project such as in your controller . this helper function is :create html modal for show Comment manager in backed
LCS_createBackendCommentHtml()
use Comment Template in frontend
laravel comment system use vue.js for show template in frontend . for use comment Template in your page (for example your article page) you shold insert bellow component in anywhere you want . <div id="lcs_comment">
<laravel_comment_system target_model_name="item_model" target_id="{{LCS_getEncodeId(1)}}" target_parent_column_name="encode_parent_id" :rtl=true :jalali_data=true></laravel_comment_system>
</div>
that target model is model you want to connect to comment and id is database id of element and 'target_parent_column_nam' is name of parrent in database .