-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoute.php
More file actions
38 lines (33 loc) · 1.56 KB
/
Copy pathRoute.php
File metadata and controls
38 lines (33 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
use App\GP247\Plugins\ProductRating\Livewire\AdminLivewire;
use App\GP247\Plugins\ProductRating\Livewire\ReviewManager;
use App\GP247\Plugins\ProductRating\Livewire\ReviewReport;
use Illuminate\Support\Facades\Route;
$config = file_get_contents(__DIR__.'/gp247.json');
$config = json_decode($config, true);
if (gp247_extension_check_active($config['configGroup'], $config['configKey'])) {
// Admin only: the storefront surface is a Livewire component embedded in the
// product-detail screen, so this plugin owns no public URL of its own.
//
// Every screen sits under the same `productrating` segment, which is what the
// Layer-2 RBAC model authorizes on (http_uri + method, ADR-001) and what
// Provider.php declares as store-scoped.
Route::group(
[
'prefix' => GP247_ADMIN_PREFIX.'/productrating',
'middleware' => GP247_ADMIN_MIDDLEWARE,
],
function () {
// Settings — the target of AppConfig::clickApp() (the "config" button
// on the Plugins screen), hence the bare index route.
Route::get('/', AdminLivewire::class)
->name('admin_productrating.index');
// Moderation queue (menu: Catalog → Product reviews).
Route::get('/review', ReviewManager::class)
->name('admin_productrating_review.index');
// Per-store statistics (menu: Report → Review statistics).
Route::get('/report', ReviewReport::class)
->name('admin_productrating_report.index');
}
);
}