debug: /__check-activitylog to verify package install
This commit is contained in:
@@ -4,6 +4,21 @@ use App\Tenancy\TenantManager;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
Route::get('/__check-activitylog/{token}', function (string $token) {
|
||||||
|
if ($token !== 'kx9zMq7vR3aF2') abort(404);
|
||||||
|
$report = [
|
||||||
|
'trait_exists' => trait_exists('Spatie\\Activitylog\\Traits\\LogsActivity'),
|
||||||
|
'class_exists_Activity' => class_exists('Spatie\\Activitylog\\Models\\Activity'),
|
||||||
|
'class_exists_LogOptions' => class_exists('Spatie\\Activitylog\\LogOptions'),
|
||||||
|
'auditable_loadable' => trait_exists('App\\Models\\Concerns\\Auditable'),
|
||||||
|
'composer_lock_present' => file_exists(base_path('composer.lock')),
|
||||||
|
'vendor_path_exists' => is_dir(base_path('vendor/spatie/laravel-activitylog')),
|
||||||
|
'vendor_path' => base_path('vendor/spatie/laravel-activitylog/src/Traits/LogsActivity.php'),
|
||||||
|
'vendor_file_exists' => file_exists(base_path('vendor/spatie/laravel-activitylog/src/Traits/LogsActivity.php')),
|
||||||
|
];
|
||||||
|
return response()->json($report, 200, [], JSON_PRETTY_PRINT);
|
||||||
|
});
|
||||||
|
|
||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
// On a tenant subdomain → redirect to the tenant panel.
|
// On a tenant subdomain → redirect to the tenant panel.
|
||||||
if (app(TenantManager::class)->isResolved()) {
|
if (app(TenantManager::class)->isResolved()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user