kanvas / moderation
Kanvas App Content Moderation Subsystem
Installs: 9 821
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 1
Type:project
Requires
- php: >= 7.4
- ext-phalcon: >=4
- canvas/core: ^0.3
- kanvas/content: ^0.1
Requires (Dev)
- codeception/codeception: ^4.1
- codeception/module-asserts: ^1.2
- codeception/module-filesystem: ^1.0
- codeception/module-phalcon: ^1.0
- codeception/module-phalcon4: ^1.0
- codeception/module-rest: ^1.2
- codeception/verify: *
- fzaninotto/faker: ^1.9
- mark-gerarts/auto-mapper-plus: 2.0.0-alpha1
- odan/phinx-migrations-generator: ^5
- phalcon/ide-stubs: ^4.0
- phalcon/incubator: 4.0.x-dev
- phalcon/incubator-acl: ^1.0.0-alpha.1
- phalcon/incubator-test: ^1.0.0-alpha.1
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ^9.1
- robmorgan/phinx: ^0.12
- squizlabs/php_codesniffer: 3.2
- vlucas/phpdotenv: ^4.1
README
This package allows you to add a moderation layer to any Kanvas Application
Usage
For the public facing controller , create a route and implement the ReportableRoute Trait
class ReportsController { use ReportableRoutes; }
To list the different report types for the current app , use the ReportableTypesRoutes Trait
class TypesController { use ReportableTypesRoutes; }
Exposing the route to block users
class UsersController { use BlockedUserRoutes; }
Routes
User report creation:
Route::post('/reports')->controller('Moderation\ReportsController')->action('create'), Route::get('/report-types')->controller('Moderation\TypesController')->action('index'),
Blocked / Unblock user routes:
Route::get('/block-users')->controller('Users\BlockUserController')->action('index'), Route::post('/block-users/{id}')->controller('Users\BlockUserController')->action('blockUser'),