pppcreative / reviews
package create Reviews table, model, observer
dev-main
2023-04-04 10:36 UTC
Requires
This package is auto-updated.
Last update: 2025-04-04 14:56:50 UTC
README
Preview
Usage
- register provider
Wame\Review\ReviewServiceProvider::class,
- vendor publish -- reviewServiceProvider
php artisan vendor:publish --provider="Wame\Reviews\ReviewServiceProvider"
- add EventServiceProvieder for observer nad listeners
/** * The event to listener mappings for the application. */ protected $listen = [ ReviewCreatingEvent::class => [RunReviewCreatingListenerJob::class], ReviewUpdatingEvent::class => [RunReviewUpdatingListenerJob::class], ReviewUpdatedEvent::class => [RunReviewUpdatedListenerJob::class], ]; /** * Register any events for your application. */ public function boot(): void { Review::observe(ReviewObserver::class); }
- add to Nova menu
MenuItem::resource(Review::class),
- set types Models or edit label colors in
config/reviews.php
'types' => [ User::class, Order::class, ], 'status_use' => true,
- edit translates
resources/lang/sk/reviews.php
"waiting" => "čakajúci", "approved" => "schválený", "denied" => "zamietnutý", "finished" => "hotové", "edit" => "upraviť",