Файл: gapps/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php
Строк: 44
<?php
namespace IlluminateFoundation;
use ComposerScriptEvent;
class ComposerScripts
{
/**
* Handle the post-install Composer event.
*
* @param ComposerScriptEvent $event
* @return void
*/
public static function postInstall(Event $event)
{
require_once $event->getComposer()->getConfig()->get('vendor-dir').'/autoload.php';
static::clearCompiled();
}
/**
* Handle the post-update Composer event.
*
* @param ComposerScriptEvent $event
* @return void
*/
public static function postUpdate(Event $event)
{
require_once $event->getComposer()->getConfig()->get('vendor-dir').'/autoload.php';
static::clearCompiled();
}
/**
* Clear the cached Laravel bootstrapping files.
*
* @return void
*/
protected static function clearCompiled()
{
$laravel = new Application(getcwd());
if (file_exists($compiledPath = $laravel->getCachedCompilePath())) {
@unlink($compiledPath);
}
if (file_exists($servicesPath = $laravel->getCachedServicesPath())) {
@unlink($servicesPath);
}
}
}