40 lines
1.5 KiB
PHP
40 lines
1.5 KiB
PHP
<?php
|
|
$base = dirname(__DIR__);
|
|
|
|
$dirs = [
|
|
$base . '/vendor/laravel/framework/src/Illuminate/Support',
|
|
$base . '/vendor/laravel/framework/src/Illuminate/Container',
|
|
$base . '/vendor/laravel/framework/src/Illuminate/Http',
|
|
$base . '/vendor/laravel/framework/src/Illuminate/Routing',
|
|
$base . '/vendor/laravel/framework/src/Illuminate/Database',
|
|
$base . '/vendor/laravel/framework/src/Illuminate/View',
|
|
$base . '/vendor/laravel/framework/src/Illuminate/Events',
|
|
$base . '/vendor/laravel/framework/src/Illuminate/Auth',
|
|
$base . '/vendor/laravel/framework/src/Illuminate/Pipeline',
|
|
$base . '/vendor/laravel/framework/src/Illuminate/Foundation',
|
|
$base . '/vendor/livewire/livewire/src',
|
|
$base . '/vendor/filament/filament/src',
|
|
$base . '/vendor/filament/support/src',
|
|
$base . '/vendor/filament/tables/src',
|
|
$base . '/vendor/filament/forms/src',
|
|
$base . '/vendor/filament/actions/src',
|
|
$base . '/vendor/filament/notifications/src',
|
|
$base . '/vendor/filament/widgets/src',
|
|
$base . '/vendor/filament/infolists/src',
|
|
$base . '/vendor/filament/schemas/src',
|
|
];
|
|
|
|
$loaded = 0;
|
|
foreach ($dirs as $dir) {
|
|
if (!is_dir($dir)) {
|
|
continue;
|
|
}
|
|
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS));
|
|
foreach ($it as $file) {
|
|
if ($file->isFile() && $file->getExtension() === 'php') {
|
|
opcache_compile_file($file->getPathname());
|
|
$loaded++;
|
|
}
|
|
}
|
|
}
|