Cache \ Adapter \ Common \ Exception \ CachePoolException
Exception thrown when executing "save".
Previous exceptions
  • file_put_contents(): Only 0 of 265 bytes written, possibly out of free disk space (0)
Cache\Adapter\Common\Exception\CachePoolException thrown with message "Exception thrown when executing "save". " Stacktrace: #44 Cache\Adapter\Common\Exception\CachePoolException in /home/lemp/www/nhakho.vn/sourcecode/vendor/cache/adapter-common/AbstractCachePool.php:338 #43 Cache\Adapter\Common\AbstractCachePool:handleException in /home/lemp/www/nhakho.vn/sourcecode/vendor/cache/adapter-common/AbstractCachePool.php:242 #42 Illuminate\Foundation\Application:Illuminate\Foundation\{closure} in [internal]:0 #41 ErrorException in /home/lemp/www/nhakho.vn/sourcecode/vendor/league/flysystem/src/Adapter/Local.php:199 #40 file_put_contents in /home/lemp/www/nhakho.vn/sourcecode/vendor/league/flysystem/src/Adapter/Local.php:199 #39 League\Flysystem\Adapter\Local:update in /home/lemp/www/nhakho.vn/sourcecode/vendor/league/flysystem/src/Filesystem.php:154 #38 League\Flysystem\Filesystem:update in /home/lemp/www/nhakho.vn/sourcecode/vendor/cache/filesystem-adapter/FilesystemCachePool.php:124 #37 Cache\Adapter\Filesystem\FilesystemCachePool:storeItemInCache in /home/lemp/www/nhakho.vn/sourcecode/vendor/cache/adapter-common/AbstractCachePool.php:240 #36 Cache\Adapter\Common\AbstractCachePool:save in /home/lemp/www/nhakho.vn/sourcecode/vendor/swayok/alternative-laravel-cache/src/AlternativeLaravelCache/Core/AlternativeCacheStore.php:158 #35 AlternativeLaravelCache\Core\AlternativeCacheStore:put in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:208 #34 Illuminate\Cache\Repository:put in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:340 #33 Illuminate\Cache\Repository:remember in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:323 #32 Illuminate\Cache\CacheManager:__call in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/Json.php:135 #31 Nwidart\Modules\Json:getAttributes in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/Json.php:41 #30 Nwidart\Modules\Json:__construct in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/Json.php:102 #29 Nwidart\Modules\Json:make in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/FileRepository.php:130 #28 Nwidart\Modules\FileRepository:scan in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/FileRepository.php:192 #27 Nwidart\Modules\FileRepository:toCollection in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/FileRepository.php:181 #26 Nwidart\Modules\FileRepository:Nwidart\Modules\{closure} in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Cache/Repository.php:340 #25 Illuminate\Cache\Repository:remember in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php:323 #24 Illuminate\Cache\CacheManager:__call in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/FileRepository.php:182 #23 Nwidart\Modules\FileRepository:getCached in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/FileRepository.php:150 #22 Nwidart\Modules\FileRepository:all in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/FileRepository.php:206 #21 Nwidart\Modules\FileRepository:getByStatus in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/FileRepository.php:234 #20 Nwidart\Modules\FileRepository:allEnabled in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/FileRepository.php:266 #19 Nwidart\Modules\FileRepository:getOrdered in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/FileRepository.php:298 #18 Nwidart\Modules\FileRepository:register in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/Providers/BootstrapServiceProvider.php:22 #17 Nwidart\Modules\Providers\BootstrapServiceProvider:register in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:598 #16 Illuminate\Foundation\Application:register in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/ModulesServiceProvider.php:38 #15 Nwidart\Modules\ModulesServiceProvider:registerModules in /home/lemp/www/nhakho.vn/sourcecode/vendor/nwidart/laravel-modules/src/LaravelModulesServiceProvider.php:15 #14 Nwidart\Modules\LaravelModulesServiceProvider:boot in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29 #13 call_user_func_array in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29 #12 Illuminate\Container\BoundMethod:Illuminate\Container\{closure} in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:87 #11 Illuminate\Container\BoundMethod:callBoundMethod in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:31 #10 Illuminate\Container\BoundMethod:call in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Container/Container.php:572 #9 Illuminate\Container\Container:call in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:819 #8 Illuminate\Foundation\Application:bootProvider in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:802 #7 Illuminate\Foundation\Application:Illuminate\Foundation\{closure} in [internal]:0 #6 array_walk in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:803 #5 Illuminate\Foundation\Application:boot in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17 #4 Illuminate\Foundation\Bootstrap\BootProviders:bootstrap in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:211 #3 Illuminate\Foundation\Application:bootstrapWith in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:162 #2 Illuminate\Foundation\Http\Kernel:bootstrap in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:146 #1 Illuminate\Foundation\Http\Kernel:sendRequestThroughRouter in /home/lemp/www/nhakho.vn/sourcecode/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 #0 Illuminate\Foundation\Http\Kernel:handle in /home/lemp/www/nhakho.vn/sourcecode/public/index.php:68
44
Cache\Adapter\Common\Exception\CachePoolException
/vendor/cache/adapter-common/AbstractCachePool.php338
43
Cache\Adapter\Common\AbstractCachePool handleException
/vendor/cache/adapter-common/AbstractCachePool.php242
42
Illuminate\Foundation\Application Illuminate\Foundation\{closure}
[internal]0
41
ErrorException
/vendor/league/flysystem/src/Adapter/Local.php199
40
file_put_contents
/vendor/league/flysystem/src/Adapter/Local.php199
39
League\Flysystem\Adapter\Local update
/vendor/league/flysystem/src/Filesystem.php154
38
League\Flysystem\Filesystem update
/vendor/cache/filesystem-adapter/FilesystemCachePool.php124
37
Cache\Adapter\Filesystem\FilesystemCachePool storeItemInCache
/vendor/cache/adapter-common/AbstractCachePool.php240
36
Cache\Adapter\Common\AbstractCachePool save
/vendor/swayok/alternative-laravel-cache/src/AlternativeLaravelCache/Core/AlternativeCacheStore.php158
35
AlternativeLaravelCache\Core\AlternativeCacheStore put
/vendor/laravel/framework/src/Illuminate/Cache/Repository.php208
34
Illuminate\Cache\Repository put
/vendor/laravel/framework/src/Illuminate/Cache/Repository.php340
33
Illuminate\Cache\Repository remember
/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php323
32
Illuminate\Cache\CacheManager __call
/vendor/nwidart/laravel-modules/src/Json.php135
31
Nwidart\Modules\Json getAttributes
/vendor/nwidart/laravel-modules/src/Json.php41
30
Nwidart\Modules\Json __construct
/vendor/nwidart/laravel-modules/src/Json.php102
29
Nwidart\Modules\Json make
/vendor/nwidart/laravel-modules/src/FileRepository.php130
28
Nwidart\Modules\FileRepository scan
/vendor/nwidart/laravel-modules/src/FileRepository.php192
27
Nwidart\Modules\FileRepository toCollection
/vendor/nwidart/laravel-modules/src/FileRepository.php181
26
Nwidart\Modules\FileRepository Nwidart\Modules\{closure}
/vendor/laravel/framework/src/Illuminate/Cache/Repository.php340
25
Illuminate\Cache\Repository remember
/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php323
24
Illuminate\Cache\CacheManager __call
/vendor/nwidart/laravel-modules/src/FileRepository.php182
23
Nwidart\Modules\FileRepository getCached
/vendor/nwidart/laravel-modules/src/FileRepository.php150
22
Nwidart\Modules\FileRepository all
/vendor/nwidart/laravel-modules/src/FileRepository.php206
21
Nwidart\Modules\FileRepository getByStatus
/vendor/nwidart/laravel-modules/src/FileRepository.php234
20
Nwidart\Modules\FileRepository allEnabled
/vendor/nwidart/laravel-modules/src/FileRepository.php266
19
Nwidart\Modules\FileRepository getOrdered
/vendor/nwidart/laravel-modules/src/FileRepository.php298
18
Nwidart\Modules\FileRepository register
/vendor/nwidart/laravel-modules/src/Providers/BootstrapServiceProvider.php22
17
Nwidart\Modules\Providers\BootstrapServiceProvider register
/vendor/laravel/framework/src/Illuminate/Foundation/Application.php598
16
Illuminate\Foundation\Application register
/vendor/nwidart/laravel-modules/src/ModulesServiceProvider.php38
15
Nwidart\Modules\ModulesServiceProvider registerModules
/vendor/nwidart/laravel-modules/src/LaravelModulesServiceProvider.php15
14
Nwidart\Modules\LaravelModulesServiceProvider boot
/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php29
13
call_user_func_array
/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php29
12
Illuminate\Container\BoundMethod Illuminate\Container\{closure}
/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php87
11
Illuminate\Container\BoundMethod callBoundMethod
/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php31
10
Illuminate\Container\BoundMethod call
/vendor/laravel/framework/src/Illuminate/Container/Container.php572
9
Illuminate\Container\Container call
/vendor/laravel/framework/src/Illuminate/Foundation/Application.php819
8
Illuminate\Foundation\Application bootProvider
/vendor/laravel/framework/src/Illuminate/Foundation/Application.php802
7
Illuminate\Foundation\Application Illuminate\Foundation\{closure}
[internal]0
6
array_walk
/vendor/laravel/framework/src/Illuminate/Foundation/Application.php803
5
Illuminate\Foundation\Application boot
/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php17
4
Illuminate\Foundation\Bootstrap\BootProviders bootstrap
/vendor/laravel/framework/src/Illuminate/Foundation/Application.php211
3
Illuminate\Foundation\Application bootstrapWith
/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php162
2
Illuminate\Foundation\Http\Kernel bootstrap
/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php146
1
Illuminate\Foundation\Http\Kernel sendRequestThroughRouter
/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php116
0
Illuminate\Foundation\Http\Kernel handle
/public/index.php68
    }
 
    /**
     * Log exception and rethrow it.
     *
     * @param \Exception $e
     * @param string     $function
     *
     * @throws CachePoolException
     */
    private function handleException(\Exception $e, $function)
    {
        $level = 'alert';
        if ($e instanceof InvalidArgumentException) {
            $level = 'warning';
        }
 
        $this->log($level, $e->getMessage(), ['exception' => $e]);
        if (!$e instanceof CacheException) {
            $e = new CachePoolException(sprintf('Exception thrown when executing "%s". ', $function), 0, $e);
        }
 
        throw $e;
    }
 
    /**
     * @param array $tags
     *
     * @return bool
     */
    public function invalidateTags(array $tags)
    {
        $itemIds = [];
        foreach ($tags as $tag) {
            $itemIds = array_merge($itemIds, $this->getList($this->getTagKey($tag)));
        }
 
        // Remove all items with the tag
        $success = $this->deleteItems($itemIds);
 
Arguments
  1. "Exception thrown when executing "save". "
    
        if (!$item instanceof PhpCacheItem) {
            $e = new InvalidArgumentException('Cache items are not transferable between pools. Item MUST implement PhpCacheItem.');
            $this->handleException($e, __FUNCTION__);
        }
 
        $this->removeTagEntries($item);
        $this->saveTags($item);
        $timeToLive = null;
        if (null !== $timestamp = $item->getExpirationTimestamp()) {
            $timeToLive = $timestamp - time();
 
            if ($timeToLive < 0) {
                return $this->deleteItem($item->getKey());
            }
        }
 
        try {
            return $this->storeItemInCache($item, $timeToLive);
        } catch (\Exception $e) {
            $this->handleException($e, __FUNCTION__);
        }
    }
 
    /**
     * {@inheritdoc}
     */
    public function saveDeferred(CacheItemInterface $item)
    {
        $this->deferred[$item->getKey()] = $item;
 
        return true;
    }
 
    /**
     * {@inheritdoc}
     */
    public function commit()
    {
        $saved = true;
        foreach ($this->deferred as $item) {
Arguments
  1. ErrorException {#309
      #message: "file_put_contents(): Only 0 of 265 bytes written, possibly out of free disk space"
      #code: 0
      #file: "/home/lemp/www/nhakho.vn/sourcecode/vendor/league/flysystem/src/Adapter/Local.php"
      #line: 199
      #severity: E_WARNING
    }
    
  2. "save"
    
Arguments
  1. Nwidart\Modules\LaravelModulesServiceProvider {#167}
    
  2. 38
    
        $stream = fopen($location, 'rb');
 
        return ['type' => 'file', 'path' => $path, 'stream' => $stream];
    }
 
    /**
     * @inheritdoc
     */
    public function updateStream($path, $resource, Config $config)
    {
        return $this->writeStream($path, $resource, $config);
    }
 
    /**
     * @inheritdoc
     */
    public function update($path, $contents, Config $config)
    {
        $location = $this->applyPathPrefix($path);
        $size = file_put_contents($location, $contents, $this->writeFlags);
 
        if ($size === false) {
            return false;
        }
 
        $type = 'file';
 
        $result = compact('type', 'path', 'size', 'contents');
 
        if ($visibility = $config->get('visibility')) {
            $this->setVisibility($path, $visibility);
            $result['visibility'] = $visibility;
        }
 
        return $result;
    }
 
    /**
     * @inheritdoc
     */
Arguments
  1. "file_put_contents(): Only 0 of 265 bytes written, possibly out of free disk space"
    
Exception message: file_put_contents(): Only 0 of 265 bytes written, possibly out of free disk space
        $stream = fopen($location, 'rb');
 
        return ['type' => 'file', 'path' => $path, 'stream' => $stream];
    }
 
    /**
     * @inheritdoc
     */
    public function updateStream($path, $resource, Config $config)
    {
        return $this->writeStream($path, $resource, $config);
    }
 
    /**
     * @inheritdoc
     */
    public function update($path, $contents, Config $config)
    {
        $location = $this->applyPathPrefix($path);
        $size = file_put_contents($location, $contents, $this->writeFlags);
 
        if ($size === false) {
            return false;
        }
 
        $type = 'file';
 
        $result = compact('type', 'path', 'size', 'contents');
 
        if ($visibility = $config->get('visibility')) {
            $this->setVisibility($path, $visibility);
            $result['visibility'] = $visibility;
        }
 
        return $result;
    }
 
    /**
     * @inheritdoc
     */
Arguments
  1. "/home/lemp/www/nhakho.vn/sourcecode/storage/framework/cache/data/cache/_nhakho_cache_ds_home_ds_lemp_ds_www_ds_nhakho.vn_ds_sourcecode_ds_Modules_ds_Account_ds_module.json"
    
  2. "a:3:{i:0;a:6:{s:4:"name";s:7:"Account";s:5:"alias";s:7:"account";s:11:"description";s:29:"The FleetCart Account Module.";s:6:"active";i:1;s:5:"order";i:100;s:9:"providers";a:1:{i:0;s:46:"Modules\Account\Providers\RouteServiceProvider";}}i:1;a:0:{}i:2;i:1710839304;}"
    
  3. 2
    
        if ($contents === false) {
            return false;
        }
 
        $this->delete($path);
 
        return $contents;
    }
 
    /**
     * @inheritdoc
     */
    public function update($path, $contents, array $config = [])
    {
        $path = Util::normalizePath($path);
        $config = $this->prepareConfig($config);
 
        $this->assertPresent($path);
 
        return (bool) $this->getAdapter()->update($path, $contents, $config);
    }
 
    /**
     * @inheritdoc
     */
    public function updateStream($path, $resource, array $config = [])
    {
        if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') {
            throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
        }
 
        $path = Util::normalizePath($path);
        $config = $this->prepareConfig($config);
        $this->assertPresent($path);
        Util::rewindStream($resource);
 
        return (bool) $this->getAdapter()->updateStream($path, $resource, $config);
    }
 
    /**
Arguments
  1. "cache/_nhakho_cache_ds_home_ds_lemp_ds_www_ds_nhakho.vn_ds_sourcecode_ds_Modules_ds_Account_ds_module.json"
    
  2. "a:3:{i:0;a:6:{s:4:"name";s:7:"Account";s:5:"alias";s:7:"account";s:11:"description";s:29:"The FleetCart Account Module.";s:6:"active";i:1;s:5:"order";i:100;s:9:"providers";a:1:{i:0;s:46:"Modules\Account\Providers\RouteServiceProvider";}}i:1;a:0:{}i:2;i:1710839304;}"
    
  3. League\Flysystem\Config {#308}
    
        return $this->forceClear($key);
    }
 
    /**
     * {@inheritdoc}
     */
    protected function storeItemInCache(PhpCacheItem $item, $ttl)
    {
        $data = serialize(
            [
                $item->get(),
                $item->getTags(),
                $item->getExpirationTimestamp(),
            ]
        );
 
        $file = $this->getFilePath($item->getKey());
        if ($this->filesystem->has($file)) {
            // Update file if it exists
            return $this->filesystem->update($file, $data);
        }
 
        try {
            return $this->filesystem->write($file, $data);
        } catch (FileExistsException $e) {
            // To handle issues when/if race conditions occurs, we try to update here.
            return $this->filesystem->update($file, $data);
        }
    }
 
    /**
     * @param string $key
     *
     * @throws InvalidArgumentException
     *
     * @return string
     */
    private function getFilePath($key)
    {
        if (!preg_match('|^[a-zA-Z0-9_\.! ]+$|', $key)) {
Arguments
  1. "cache/_nhakho_cache_ds_home_ds_lemp_ds_www_ds_nhakho.vn_ds_sourcecode_ds_Modules_ds_Account_ds_module.json"
    
  2. "a:3:{i:0;a:6:{s:4:"name";s:7:"Account";s:5:"alias";s:7:"account";s:11:"description";s:29:"The FleetCart Account Module.";s:6:"active";i:1;s:5:"order";i:100;s:9:"providers";a:1:{i:0;s:46:"Modules\Account\Providers\RouteServiceProvider";}}i:1;a:0:{}i:2;i:1710839304;}"
    
    public function save(CacheItemInterface $item)
    {
        if (!$item instanceof PhpCacheItem) {
            $e = new InvalidArgumentException('Cache items are not transferable between pools. Item MUST implement PhpCacheItem.');
            $this->handleException($e, __FUNCTION__);
        }
 
        $this->removeTagEntries($item);
        $this->saveTags($item);
        $timeToLive = null;
        if (null !== $timestamp = $item->getExpirationTimestamp()) {
            $timeToLive = $timestamp - time();
 
            if ($timeToLive < 0) {
                return $this->deleteItem($item->getKey());
            }
        }
 
        try {
            return $this->storeItemInCache($item, $timeToLive);
        } catch (\Exception $e) {
            $this->handleException($e, __FUNCTION__);
        }
    }
 
    /**
     * {@inheritdoc}
     */
    public function saveDeferred(CacheItemInterface $item)
    {
        $this->deferred[$item->getKey()] = $item;
 
        return true;
    }
 
    /**
     * {@inheritdoc}
     */
    public function commit()
    {
Arguments
  1. Cache\Adapter\Common\CacheItem {#307}
    
  2. 3600
    
     * @return array
     * @throws \Psr\Cache\InvalidArgumentException
     */
    public function many(array $keys) {
        $this->_pullTags();
        $items = $this->getWrappedConnection()->getItems(array_map([$this, 'itemKey'], $keys));
        return array_map([$this, 'decodeItem'], $items);
    }
 
    /**
     * Store an item in the cache for a given number of minutes/seconds.
     *
     * @param  string $key
     * @param  mixed $value
     * @param  int $duration - seconds for Laravel >= 5.8 or minutes for Laravel <= 5.7
     * @return void
     * @throws \Psr\Cache\InvalidArgumentException
     */
    public function put($key, $value, $duration) {
        return $this->getWrappedConnection()->save($this->newItem($key, $value, $this->_pullTags(), $duration));
    }
 
    /**
     * Store multiple items in the cache for a given number of minutes.
     *
     * @param  array $values
     * @param  int $duration - seconds for Laravel >= 5.8 or minutes for Laravel <= 5.7
     * @return void
     */
    public function putMany(array $values, $duration) {
        if (!count($values)) {
            return;
        }
        $tags = $this->_pullTags();
        foreach ($values as $key => $value) {
            $this->getWrappedConnection()->saveDeferred($this->newItem($key, $value, $tags));
        }
        return $this->getWrappedConnection()->commit();
    }
 
Arguments
  1. Cache\Adapter\Common\CacheItem {#307}
    
    }
 
    /**
     * Store an item in the cache.
     *
     * @param  string  $key
     * @param  mixed   $value
     * @param  \DateTimeInterface|\DateInterval|float|int|null  $minutes
     * @return void
     */
    public function put($key, $value, $minutes = null)
    {
        if (is_array($key)) {
            $this->putMany($key, $value);
 
            return;
        }
 
        if (! is_null($minutes = $this->getMinutes($minutes))) {
            $this->store->put($this->itemKey($key), $value, $minutes);
 
            $this->event(new KeyWritten($key, $value, $minutes));
        }
    }
 
    /**
     * {@inheritdoc}
     */
    public function set($key, $value, $ttl = null)
    {
        $this->put($key, $value, $ttl);
    }
 
    /**
     * Store multiple items in the cache for a given number of minutes.
     *
     * @param  array  $values
     * @param  \DateTimeInterface|\DateInterval|float|int  $minutes
     * @return void
     */
Arguments
  1. "/home/lemp/www/nhakho.vn/sourcecode/Modules/Account/module.json"
    
  2. array:6 [
      "name" => "Account"
      "alias" => "account"
      "description" => "The FleetCart Account Module."
      "active" => 1
      "order" => 100
      "providers" => array:1 [
        0 => "Modules\Account\Providers\RouteServiceProvider"
      ]
    ]
    
  3. 60
    
    /**
     * Get an item from the cache, or execute the given Closure and store the result.
     *
     * @param  string  $key
     * @param  \DateTimeInterface|\DateInterval|float|int  $minutes
     * @param  \Closure  $callback
     * @return mixed
     */
    public function remember($key, $minutes, Closure $callback)
    {
        $value = $this->get($key);
 
        // If the item exists in the cache we will just return this immediately and if
        // not we will execute the given Closure and cache the result of that for a
        // given number of minutes so it's available for all subsequent requests.
        if (! is_null($value)) {
            return $value;
        }
 
        $this->put($key, $value = $callback(), $minutes);
 
        return $value;
    }
 
    /**
     * Get an item from the cache, or execute the given Closure and store the result forever.
     *
     * @param  string  $key
     * @param  \Closure  $callback
     * @return mixed
     */
    public function sear($key, Closure $callback)
    {
        return $this->rememberForever($key, $callback);
    }
 
    /**
     * Get an item from the cache, or execute the given Closure and store the result forever.
     *
     * @param  string  $key
Arguments
  1. "/home/lemp/www/nhakho.vn/sourcecode/Modules/Account/module.json"
    
  2. array:6 [
      "name" => "Account"
      "alias" => "account"
      "description" => "The FleetCart Account Module."
      "active" => 1
      "order" => 100
      "providers" => array:1 [
        0 => "Modules\Account\Providers\RouteServiceProvider"
      ]
    ]
    
  3. 60
    
     * @param  \Closure  $callback
     * @return $this
     */
    public function extend($driver, Closure $callback)
    {
        $this->customCreators[$driver] = $callback->bindTo($this, $this);
 
        return $this;
    }
 
    /**
     * Dynamically call the default driver instance.
     *
     * @param  string  $method
     * @param  array  $parameters
     * @return mixed
     */
    public function __call($method, $parameters)
    {
        return $this->store()->$method(...$parameters);
    }
}
 
Arguments
  1. "/home/lemp/www/nhakho.vn/sourcecode/Modules/Account/module.json"
    
  2. 60
    
  3. Closure() {#306 …4}
    
     * Get file contents as array.
     * @return array
     * @throws \Exception
     */
    public function getAttributes()
    {
        $attributes = json_decode($this->getContents(), 1);
 
        // any JSON parsing errors should throw an exception
        if (json_last_error() > 0) {
            throw new InvalidJsonException('Error processing file: ' . $this->getPath() . '. Error: ' . json_last_error_msg());
        }
 
        if (config('modules.cache.enabled') === false) {
            return $attributes;
        }
 
        return app('cache')->remember($this->getPath(), config('modules.cache.lifetime'), function () use ($attributes) {
            return $attributes;
        });
    }
 
    /**
     * Convert the given array data to pretty json.
     *
     * @param array $data
     *
     * @return string
     */
    public function toJsonPretty(array $data = null)
    {
        return json_encode($data ?: $this->attributes, JSON_PRETTY_PRINT);
    }
 
    /**
     * Update json contents from array data.
     *
     * @param array $data
     *
     * @return bool
Arguments
  1. "remember"
    
  2. array:3 [
      0 => "/home/lemp/www/nhakho.vn/sourcecode/Modules/Account/module.json"
      1 => 60
      2 => Closure() {#306 …4}
    ]
    
    protected $filesystem;
 
    /**
     * The attributes collection.
     *
     * @var \Illuminate\Support\Collection
     */
    protected $attributes;
 
    /**
     * The constructor.
     *
     * @param mixed                             $path
     * @param \Illuminate\Filesystem\Filesystem $filesystem
     */
    public function __construct($path, Filesystem $filesystem = null)
    {
        $this->path = (string) $path;
        $this->filesystem = $filesystem ?: new Filesystem();
        $this->attributes = Collection::make($this->getAttributes());
    }
 
    /**
     * Get filesystem.
     *
     * @return Filesystem
     */
    public function getFilesystem()
    {
        return $this->filesystem;
    }
 
    /**
     * Set filesystem.
     *
     * @param Filesystem $filesystem
     *
     * @return $this
     */
    public function setFilesystem(Filesystem $filesystem)
     * @return $this
     */
    public function setPath($path)
    {
        $this->path = (string) $path;
 
        return $this;
    }
 
    /**
     * Make new instance.
     *
     * @param string                            $path
     * @param \Illuminate\Filesystem\Filesystem $filesystem
     *
     * @return static
     */
    public static function make($path, Filesystem $filesystem = null)
    {
        return new static($path, $filesystem);
    }
 
    /**
     * Get file content.
     *
     * @return string
     */
    public function getContents()
    {
        return $this->filesystem->get($this->getPath());
    }
 
    /**
     * Get file contents as array.
     * @return array
     * @throws \Exception
     */
    public function getAttributes()
    {
        $attributes = json_decode($this->getContents(), 1);
Arguments
  1. "/home/lemp/www/nhakho.vn/sourcecode/Modules/Account/module.json"
    
  2. null
    
    abstract protected function createModule(...$args);
 
    /**
     * Get & scan all modules.
     *
     * @return array
     */
    public function scan()
    {
        $paths = $this->getScanPaths();
 
        $modules = [];
 
        foreach ($paths as $key => $path) {
            $manifests = $this->app['files']->glob("{$path}/module.json");
 
            is_array($manifests) || $manifests = [];
 
            foreach ($manifests as $manifest) {
                $name = Json::make($manifest)->get('name');
 
                $modules[$name] = $this->createModule($this->app, $name, dirname($manifest));
            }
        }
 
        return $modules;
    }
 
    /**
     * Get all modules.
     *
     * @return array
     */
    public function all() : array
    {
        if (!$this->config('cache.enabled')) {
            return $this->scan();
        }
 
        return $this->formatCached($this->getCached());
Arguments
  1. "/home/lemp/www/nhakho.vn/sourcecode/Modules/Account/module.json"
    
    /**
     * Get cached modules.
     *
     * @return array
     */
    public function getCached()
    {
        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () {
            return $this->toCollection()->toArray();
        });
    }
 
    /**
     * Get all modules as collection instance.
     *
     * @return Collection
     */
    public function toCollection() : Collection
    {
        return new Collection($this->scan());
    }
 
    /**
     * Get modules by status.
     *
     * @param $status
     *
     * @return array
     */
    public function getByStatus($status) : array
    {
        $modules = [];
 
        foreach ($this->all() as $name => $module) {
            if ($module->isStatus($status)) {
                $modules[$name] = $module;
            }
        }
 
        return $modules;
        $modules = [];
 
        foreach ($cached as $name => $module) {
            $path = $module["path"];
 
            $modules[$name] = $this->createModule($this->app, $name, $path);
        }
 
        return $modules;
    }
 
    /**
     * Get cached modules.
     *
     * @return array
     */
    public function getCached()
    {
        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () {
            return $this->toCollection()->toArray();
        });
    }
 
    /**
     * Get all modules as collection instance.
     *
     * @return Collection
     */
    public function toCollection() : Collection
    {
        return new Collection($this->scan());
    }
 
    /**
     * Get modules by status.
     *
     * @param $status
     *
     * @return array
     */
    /**
     * Get an item from the cache, or execute the given Closure and store the result.
     *
     * @param  string  $key
     * @param  \DateTimeInterface|\DateInterval|float|int  $minutes
     * @param  \Closure  $callback
     * @return mixed
     */
    public function remember($key, $minutes, Closure $callback)
    {
        $value = $this->get($key);
 
        // If the item exists in the cache we will just return this immediately and if
        // not we will execute the given Closure and cache the result of that for a
        // given number of minutes so it's available for all subsequent requests.
        if (! is_null($value)) {
            return $value;
        }
 
        $this->put($key, $value = $callback(), $minutes);
 
        return $value;
    }
 
    /**
     * Get an item from the cache, or execute the given Closure and store the result forever.
     *
     * @param  string  $key
     * @param  \Closure  $callback
     * @return mixed
     */
    public function sear($key, Closure $callback)
    {
        return $this->rememberForever($key, $callback);
    }
 
    /**
     * Get an item from the cache, or execute the given Closure and store the result forever.
     *
     * @param  string  $key
     * @param  \Closure  $callback
     * @return $this
     */
    public function extend($driver, Closure $callback)
    {
        $this->customCreators[$driver] = $callback->bindTo($this, $this);
 
        return $this;
    }
 
    /**
     * Dynamically call the default driver instance.
     *
     * @param  string  $method
     * @param  array  $parameters
     * @return mixed
     */
    public function __call($method, $parameters)
    {
        return $this->store()->$method(...$parameters);
    }
}
 
Arguments
  1. "kojca-modules"
    
  2. 60
    
  3. Closure() {#292 …4}
    
 
        foreach ($cached as $name => $module) {
            $path = $module["path"];
 
            $modules[$name] = $this->createModule($this->app, $name, $path);
        }
 
        return $modules;
    }
 
    /**
     * Get cached modules.
     *
     * @return array
     */
    public function getCached()
    {
        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () {
            return $this->toCollection()->toArray();
        });
    }
 
    /**
     * Get all modules as collection instance.
     *
     * @return Collection
     */
    public function toCollection() : Collection
    {
        return new Collection($this->scan());
    }
 
    /**
     * Get modules by status.
     *
     * @param $status
     *
     * @return array
     */
    public function getByStatus($status) : array
Arguments
  1. "remember"
    
  2. array:3 [
      0 => "kojca-modules"
      1 => 60
      2 => Closure() {#292 …4}
    ]
    
 
                $modules[$name] = $this->createModule($this->app, $name, dirname($manifest));
            }
        }
 
        return $modules;
    }
 
    /**
     * Get all modules.
     *
     * @return array
     */
    public function all() : array
    {
        if (!$this->config('cache.enabled')) {
            return $this->scan();
        }
 
        return $this->formatCached($this->getCached());
    }
 
    /**
     * Format the cached data as array of modules.
     *
     * @param array $cached
     *
     * @return array
     */
    protected function formatCached($cached)
    {
        $modules = [];
 
        foreach ($cached as $name => $module) {
            $path = $module["path"];
 
            $modules[$name] = $this->createModule($this->app, $name, $path);
        }
 
        return $modules;
     *
     * @return Collection
     */
    public function toCollection() : Collection
    {
        return new Collection($this->scan());
    }
 
    /**
     * Get modules by status.
     *
     * @param $status
     *
     * @return array
     */
    public function getByStatus($status) : array
    {
        $modules = [];
 
        foreach ($this->all() as $name => $module) {
            if ($module->isStatus($status)) {
                $modules[$name] = $module;
            }
        }
 
        return $modules;
    }
 
    /**
     * Determine whether the given module exist.
     *
     * @param $name
     *
     * @return bool
     */
    public function has($name) : bool
    {
        return array_key_exists($name, $this->all());
    }
 
    /**
     * Determine whether the given module exist.
     *
     * @param $name
     *
     * @return bool
     */
    public function has($name) : bool
    {
        return array_key_exists($name, $this->all());
    }
 
    /**
     * Get list of enabled modules.
     *
     * @return array
     */
    public function allEnabled() : array
    {
        return $this->getByStatus(1);
    }
 
    /**
     * Get list of disabled modules.
     *
     * @return array
     */
    public function allDisabled() : array
    {
        return $this->getByStatus(0);
    }
 
    /**
     * Get count from all modules.
     *
     * @return int
     */
    public function count() : int
    {
        return count($this->all());
Arguments
  1. 1
    
    /**
     * Get count from all modules.
     *
     * @return int
     */
    public function count() : int
    {
        return count($this->all());
    }
 
    /**
     * Get all ordered modules.
     *
     * @param string $direction
     *
     * @return array
     */
    public function getOrdered($direction = 'asc') : array
    {
        $modules = $this->allEnabled();
 
        uasort($modules, function (Module $a, Module $b) use ($direction) {
            if ($a->order == $b->order) {
                return 0;
            }
 
            if ($direction == 'desc') {
                return $a->order < $b->order ? 1 : -1;
            }
 
            return $a->order > $b->order ? 1 : -1;
        });
 
        return $modules;
    }
 
    /**
     * Get a module path.
     *
     * @return string
 
        return $modules;
    }
 
    /**
     * Get a module path.
     *
     * @return string
     */
    public function getPath() : string
    {
        return $this->path ?: $this->config('paths.modules', base_path('Modules'));
    }
 
    /**
     * Register the modules.
     */
    public function register()
    {
        foreach ($this->getOrdered() as $module) {
            $module->register();
        }
    }
 
    /**
     * Boot the modules.
     */
    public function boot()
    {
        foreach ($this->getOrdered() as $module) {
            $module->boot();
        }
    }
 
    /**
     * Find a specific module.
     * @param $name
     * @return mixed|void
     */
    public function find($name)
namespace Nwidart\Modules\Providers;
 
use Illuminate\Support\ServiceProvider;
 
class BootstrapServiceProvider extends ServiceProvider
{
    /**
     * Booting the package.
     */
    public function boot()
    {
        $this->app['modules']->boot();
    }
 
    /**
     * Register the provider.
     */
    public function register()
    {
        $this->app['modules']->register();
    }
}
 
     *
     * @param  \Illuminate\Support\ServiceProvider|string  $provider
     * @param  bool   $force
     * @return \Illuminate\Support\ServiceProvider
     */
    public function register($provider, $force = false)
    {
        if (($registered = $this->getProvider($provider)) && ! $force) {
            return $registered;
        }
 
        // If the given "provider" is a string, we will resolve it, passing in the
        // application instance automatically for the developer. This is simply
        // a more convenient way of specifying your service provider classes.
        if (is_string($provider)) {
            $provider = $this->resolveProvider($provider);
        }
 
        if (method_exists($provider, 'register')) {
            $provider->register();
        }
 
        // If there are bindings / singletons set as properties on the provider we
        // will spin through them and register them with the application, which
        // serves as a convenience layer while registering a lot of bindings.
        if (property_exists($provider, 'bindings')) {
            foreach ($provider->bindings as $key => $value) {
                $this->bind($key, $value);
            }
        }
 
        if (property_exists($provider, 'singletons')) {
            foreach ($provider->singletons as $key => $value) {
                $this->singleton($key, $value);
            }
        }
 
        $this->markAsRegistered($provider);
 
        // If the application has already booted, we will call this boot method on
    /**
     * Booting the package.
     */
    public function boot()
    {
    }
 
    /**
     * Register all modules.
     */
    public function register()
    {
    }
 
    /**
     * Register all modules.
     */
    protected function registerModules()
    {
        $this->app->register(BootstrapServiceProvider::class);
    }
 
    /**
     * Register package's namespaces.
     */
    protected function registerNamespaces()
    {
        $configPath = __DIR__ . '/../config/config.php';
 
        $this->mergeConfigFrom($configPath, 'modules');
        $this->publishes([
            $configPath => config_path('modules.php'),
        ], 'config');
    }
 
    /**
     * Register the service provider.
     */
    abstract protected function registerServices();
 
Arguments
  1. Nwidart\Modules\Providers\BootstrapServiceProvider {#283}
    
<?php
 
namespace Nwidart\Modules;
 
use Nwidart\Modules\Support\Stub;
 
class LaravelModulesServiceProvider extends ModulesServiceProvider
{
    /**
     * Booting the package.
     */
    public function boot()
    {
        $this->registerNamespaces();
        $this->registerModules();
    }
 
    /**
     * Register the service provider.
     */
    public function register()
    {
        $this->registerServices();
        $this->setupStubPath();
        $this->registerProviders();
    }
 
    /**
     * Setup stub path.
     */
    public function setupStubPath()
    {
        Stub::setBasePath(__DIR__ . '/Commands/stubs');
 
        $this->app->booted(function ($app) {
            if ($app['modules']->config('stubs.enabled') === true) {
                Stub::setBasePath($app['modules']->config('stubs.path'));
            }
        });
    }
class BoundMethod
{
    /**
     * Call the given Closure / class@method and inject its dependencies.
     *
     * @param  \Illuminate\Container\Container  $container
     * @param  callable|string  $callback
     * @param  array  $parameters
     * @param  string|null  $defaultMethod
     * @return mixed
     */
    public static function call($container, $callback, array $parameters = [], $defaultMethod = null)
    {
        if (static::isCallableWithAtSign($callback) || $defaultMethod) {
            return static::callClass($container, $callback, $parameters, $defaultMethod);
        }
 
        return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
            return call_user_func_array(
                $callback, static::getMethodDependencies($container, $callback, $parameters)
            );
        });
    }
 
    /**
     * Call a string reference to a class using Class@method syntax.
     *
     * @param  \Illuminate\Container\Container  $container
     * @param  string  $target
     * @param  array  $parameters
     * @param  string|null  $defaultMethod
     * @return mixed
     *
     * @throws \InvalidArgumentException
     */
    protected static function callClass($container, $target, array $parameters = [], $defaultMethod = null)
    {
        $segments = explode('@', $target);
 
        // We will assume an @ sign is used to delimit the class name from the method
class BoundMethod
{
    /**
     * Call the given Closure / class@method and inject its dependencies.
     *
     * @param  \Illuminate\Container\Container  $container
     * @param  callable|string  $callback
     * @param  array  $parameters
     * @param  string|null  $defaultMethod
     * @return mixed
     */
    public static function call($container, $callback, array $parameters = [], $defaultMethod = null)
    {
        if (static::isCallableWithAtSign($callback) || $defaultMethod) {
            return static::callClass($container, $callback, $parameters, $defaultMethod);
        }
 
        return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
            return call_user_func_array(
                $callback, static::getMethodDependencies($container, $callback, $parameters)
            );
        });
    }
 
    /**
     * Call a string reference to a class using Class@method syntax.
     *
     * @param  \Illuminate\Container\Container  $container
     * @param  string  $target
     * @param  array  $parameters
     * @param  string|null  $defaultMethod
     * @return mixed
     *
     * @throws \InvalidArgumentException
     */
    protected static function callClass($container, $target, array $parameters = [], $defaultMethod = null)
    {
        $segments = explode('@', $target);
 
        // We will assume an @ sign is used to delimit the class name from the method
Arguments
  1. array:2 [
      0 => Nwidart\Modules\LaravelModulesServiceProvider {#167}
      1 => "boot"
    ]
    
  2. []
    
     * @param  callable  $callback
     * @param  mixed  $default
     * @return mixed
     */
    protected static function callBoundMethod($container, $callback, $default)
    {
        if (! is_array($callback)) {
            return $default instanceof Closure ? $default() : $default;
        }
 
        // Here we need to turn the array callable into a Class@method string we can use to
        // examine the container and see if there are any method bindings for this given
        // method. If there are, we can call this method binding callback immediately.
        $method = static::normalizeMethod($callback);
 
        if ($container->hasMethodBinding($method)) {
            return $container->callMethodBinding($method, $callback[0]);
        }
 
        return $default instanceof Closure ? $default() : $default;
    }
 
    /**
     * Normalize the given callback into a Class@method string.
     *
     * @param  callable  $callback
     * @return string
     */
    protected static function normalizeMethod($callback)
    {
        $class = is_string($callback[0]) ? $callback[0] : get_class($callback[0]);
 
        return "{$class}@{$callback[1]}";
    }
 
    /**
     * Get all dependencies for a given method.
     *
     * @param  \Illuminate\Container\Container  $container
     * @param  callable|string  $callback
    /**
     * Call the given Closure / class@method and inject its dependencies.
     *
     * @param  \Illuminate\Container\Container  $container
     * @param  callable|string  $callback
     * @param  array  $parameters
     * @param  string|null  $defaultMethod
     * @return mixed
     */
    public static function call($container, $callback, array $parameters = [], $defaultMethod = null)
    {
        if (static::isCallableWithAtSign($callback) || $defaultMethod) {
            return static::callClass($container, $callback, $parameters, $defaultMethod);
        }
 
        return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {
            return call_user_func_array(
                $callback, static::getMethodDependencies($container, $callback, $parameters)
            );
        });
    }
 
    /**
     * Call a string reference to a class using Class@method syntax.
     *
     * @param  \Illuminate\Container\Container  $container
     * @param  string  $target
     * @param  array  $parameters
     * @param  string|null  $defaultMethod
     * @return mixed
     *
     * @throws \InvalidArgumentException
     */
    protected static function callClass($container, $target, array $parameters = [], $defaultMethod = null)
    {
        $segments = explode('@', $target);
 
        // We will assume an @ sign is used to delimit the class name from the method
        // name. We will split on this @ sign and then build a callable array that
        // we can pass right back into the "call" method for dependency binding.
Arguments
  1. Illuminate\Foundation\Application {#2}
    
  2. array:2 [
      0 => Nwidart\Modules\LaravelModulesServiceProvider {#167}
      1 => "boot"
    ]
    
  3. Closure() {#31 …3}
    
     * @return \Closure
     */
    public function wrap(Closure $callback, array $parameters = [])
    {
        return function () use ($callback, $parameters) {
            return $this->call($callback, $parameters);
        };
    }
 
    /**
     * Call the given Closure / class@method and inject its dependencies.
     *
     * @param  callable|string  $callback
     * @param  array  $parameters
     * @param  string|null  $defaultMethod
     * @return mixed
     */
    public function call($callback, array $parameters = [], $defaultMethod = null)
    {
        return BoundMethod::call($this, $callback, $parameters, $defaultMethod);
    }
 
    /**
     * Get a closure to resolve the given type from the container.
     *
     * @param  string  $abstract
     * @return \Closure
     */
    public function factory($abstract)
    {
        return function () use ($abstract) {
            return $this->make($abstract);
        };
    }
 
    /**
     * An alias function name for make().
     *
     * @param  string  $abstract
     * @param  array  $parameters
Arguments
  1. Illuminate\Foundation\Application {#2}
    
  2. array:2 [
      0 => Nwidart\Modules\LaravelModulesServiceProvider {#167}
      1 => "boot"
    ]
    
  3. []
    
  4. null
    
 
        array_walk($this->serviceProviders, function ($p) {
            $this->bootProvider($p);
        });
 
        $this->booted = true;
 
        $this->fireAppCallbacks($this->bootedCallbacks);
    }
 
    /**
     * Boot the given service provider.
     *
     * @param  \Illuminate\Support\ServiceProvider  $provider
     * @return mixed
     */
    protected function bootProvider(ServiceProvider $provider)
    {
        if (method_exists($provider, 'boot')) {
            return $this->call([$provider, 'boot']);
        }
    }
 
    /**
     * Register a new boot listener.
     *
     * @param  callable  $callback
     * @return void
     */
    public function booting($callback)
    {
        $this->bootingCallbacks[] = $callback;
    }
 
    /**
     * Register a new "booted" listener.
     *
     * @param  callable  $callback
     * @return void
     */
Arguments
  1. array:2 [
      0 => Nwidart\Modules\LaravelModulesServiceProvider {#167}
      1 => "boot"
    ]
    
    }
 
    /**
     * Boot the application's service providers.
     *
     * @return void
     */
    public function boot()
    {
        if ($this->booted) {
            return;
        }
 
        // Once the application has booted we will also fire some "booted" callbacks
        // for any listeners that need to do work after this initial booting gets
        // finished. This is useful when ordering the boot-up processes we run.
        $this->fireAppCallbacks($this->bootingCallbacks);
 
        array_walk($this->serviceProviders, function ($p) {
            $this->bootProvider($p);
        });
 
        $this->booted = true;
 
        $this->fireAppCallbacks($this->bootedCallbacks);
    }
 
    /**
     * Boot the given service provider.
     *
     * @param  \Illuminate\Support\ServiceProvider  $provider
     * @return mixed
     */
    protected function bootProvider(ServiceProvider $provider)
    {
        if (method_exists($provider, 'boot')) {
            return $this->call([$provider, 'boot']);
        }
    }
 
Arguments
  1. Nwidart\Modules\LaravelModulesServiceProvider {#167}
    
Arguments
  1. Nwidart\Modules\LaravelModulesServiceProvider {#167}
    
  2. 38
    
 
    /**
     * Boot the application's service providers.
     *
     * @return void
     */
    public function boot()
    {
        if ($this->booted) {
            return;
        }
 
        // Once the application has booted we will also fire some "booted" callbacks
        // for any listeners that need to do work after this initial booting gets
        // finished. This is useful when ordering the boot-up processes we run.
        $this->fireAppCallbacks($this->bootingCallbacks);
 
        array_walk($this->serviceProviders, function ($p) {
            $this->bootProvider($p);
        });
 
        $this->booted = true;
 
        $this->fireAppCallbacks($this->bootedCallbacks);
    }
 
    /**
     * Boot the given service provider.
     *
     * @param  \Illuminate\Support\ServiceProvider  $provider
     * @return mixed
     */
    protected function bootProvider(ServiceProvider $provider)
    {
        if (method_exists($provider, 'boot')) {
            return $this->call([$provider, 'boot']);
        }
    }
 
    /**
Arguments
  1. array:45 [
      0 => Illuminate\Events\EventServiceProvider {#6}
      1 => Illuminate\Log\LogServiceProvider {#8}
      2 => Illuminate\Routing\RoutingServiceProvider {#10}
      3 => Illuminate\Auth\AuthServiceProvider {#41}
      4 => Illuminate\Cookie\CookieServiceProvider {#37}
      5 => Illuminate\Database\DatabaseServiceProvider {#51}
      6 => Illuminate\Encryption\EncryptionServiceProvider {#58}
      7 => Illuminate\Filesystem\FilesystemServiceProvider {#60}
      8 => Illuminate\Foundation\Providers\FormRequestServiceProvider {#66}
      9 => Illuminate\Foundation\Providers\FoundationServiceProvider {#65}
      10 => Illuminate\Pagination\PaginationServiceProvider {#69}
      11 => Illuminate\Session\SessionServiceProvider {#73}
      12 => Illuminate\View\ViewServiceProvider {#77}
      13 => Illuminate\Notifications\NotificationServiceProvider {#81}
      14 => Barryvdh\Debugbar\ServiceProvider {#83}
      15 => BeyondCode\DumpServer\DumpServerServiceProvider {#87}
      16 => BeyondCode\QueryDetector\QueryDetectorServiceProvider {#95}
      17 => Igoshev\Captcha\Providers\CaptchaServiceProvider {#97}
      18 => Cartalyst\Sentinel\Laravel\SentinelServiceProvider {#99}
      19 => Darryldecode\Cart\CartServiceProvider {#114}
      20 => Dimsav\Translatable\TranslatableServiceProvider {#116}
      21 => Fideloper\Proxy\TrustedProxyServiceProvider {#117}
      22 => Intervention\Image\ImageServiceProvider {#118}
      23 => Illuminate\Notifications\NexmoChannelServiceProvider {#121}
      24 => Laravel\Scout\ScoutServiceProvider {#124}
      25 => Illuminate\Notifications\SlackChannelServiceProvider {#126}
      26 => Maatwebsite\Excel\ExcelServiceProvider {#128}
      27 => Mcamara\LaravelLocalization\LaravelLocalizationServiceProvider {#140}
      28 => Carbon\Laravel\ServiceProvider {#146}
      29 => Silber\PageCache\LaravelServiceProvider {#147}
      30 => Spatie\ResponseCache\ResponseCacheServiceProvider {#150}
      31 => AlternativeLaravelCache\Provider\AlternativeCacheStoresServiceProvider {#151}
      32 => Tightenco\Ziggy\ZiggyServiceProvider {#153}
      33 => Yajra\DataTables\DataTablesServiceProvider {#154}
      34 => Collective\Html\HtmlServiceProvider {#160}
      35 => FloatingPoint\Stylist\StylistServiceProvider {#159}
      36 => Nwidart\Modules\Providers\ConsoleServiceProvider {#170}
      37 => Nwidart\Modules\Providers\ContractsServiceProvider {#172}
      38 => Nwidart\Modules\LaravelModulesServiceProvider {#167}
      39 => FleetCart\Providers\AppServiceProvider {#158}
      40 => FleetCart\Providers\RouteServiceProvider {#174}
      41 => FleetCart\Providers\EventServiceProvider {#175}
      42 => Illuminate\Translation\TranslationServiceProvider {#185}
      43 => Illuminate\Validation\ValidationServiceProvider {#254}
      44 => Illuminate\Cache\CacheServiceProvider {#286}
    ]
    
  2. Closure($p) {#22 …4}
    
<?php
 
namespace Illuminate\Foundation\Bootstrap;
 
use Illuminate\Contracts\Foundation\Application;
 
class BootProviders
{
    /**
     * Bootstrap the given application.
     *
     * @param  \Illuminate\Contracts\Foundation\Application  $app
     * @return void
     */
    public function bootstrap(Application $app)
    {
        $app->boot();
    }
}
 
    {
        $this->register(new EventServiceProvider($this));
        $this->register(new LogServiceProvider($this));
        $this->register(new RoutingServiceProvider($this));
    }
 
    /**
     * Run the given array of bootstrap classes.
     *
     * @param  string[]  $bootstrappers
     * @return void
     */
    public function bootstrapWith(array $bootstrappers)
    {
        $this->hasBeenBootstrapped = true;
 
        foreach ($bootstrappers as $bootstrapper) {
            $this['events']->dispatch('bootstrapping: '.$bootstrapper, [$this]);
 
            $this->make($bootstrapper)->bootstrap($this);
 
            $this['events']->dispatch('bootstrapped: '.$bootstrapper, [$this]);
        }
    }
 
    /**
     * Register a callback to run after loading the environment.
     *
     * @param  \Closure  $callback
     * @return void
     */
    public function afterLoadingEnvironment(Closure $callback)
    {
        return $this->afterBootstrapping(
            LoadEnvironmentVariables::class, $callback
        );
    }
 
    /**
     * Register a callback to run before a bootstrapper.
Arguments
  1. Illuminate\Foundation\Application {#2}
    
 
        Facade::clearResolvedInstance('request');
 
        $this->bootstrap();
 
        return (new Pipeline($this->app))
                    ->send($request)
                    ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
                    ->then($this->dispatchToRouter());
    }
 
    /**
     * Bootstrap the application for HTTP requests.
     *
     * @return void
     */
    public function bootstrap()
    {
        if (! $this->app->hasBeenBootstrapped()) {
            $this->app->bootstrapWith($this->bootstrappers());
        }
    }
 
    /**
     * Get the route dispatcher callback.
     *
     * @return \Closure
     */
    protected function dispatchToRouter()
    {
        return function ($request) {
            $this->app->instance('request', $request);
 
            return $this->router->dispatch($request);
        };
    }
 
    /**
     * Call the terminate method on any terminable middleware.
     *
Arguments
  1. array:6 [
      0 => "Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables"
      1 => "Illuminate\Foundation\Bootstrap\LoadConfiguration"
      2 => "Illuminate\Foundation\Bootstrap\HandleExceptions"
      3 => "Illuminate\Foundation\Bootstrap\RegisterFacades"
      4 => "Illuminate\Foundation\Bootstrap\RegisterProviders"
      5 => "Illuminate\Foundation\Bootstrap\BootProviders"
    ]
    
        $this->app['events']->dispatch(
            new Events\RequestHandled($request, $response)
        );
 
        return $response;
    }
 
    /**
     * Send the given request through the middleware / router.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    protected function sendRequestThroughRouter($request)
    {
        $this->app->instance('request', $request);
 
        Facade::clearResolvedInstance('request');
 
        $this->bootstrap();
 
        return (new Pipeline($this->app))
                    ->send($request)
                    ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
                    ->then($this->dispatchToRouter());
    }
 
    /**
     * Bootstrap the application for HTTP requests.
     *
     * @return void
     */
    public function bootstrap()
    {
        if (! $this->app->hasBeenBootstrapped()) {
            $this->app->bootstrapWith($this->bootstrappers());
        }
    }
 
    /**
            $router->middlewareGroup($key, $middleware);
        }
 
        foreach ($this->routeMiddleware as $key => $middleware) {
            $router->aliasMiddleware($key, $middleware);
        }
    }
 
    /**
     * Handle an incoming HTTP request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function handle($request)
    {
        try {
            $request->enableHttpMethodParameterOverride();
 
            $response = $this->sendRequestThroughRouter($request);
        } catch (Exception $e) {
            $this->reportException($e);
 
            $response = $this->renderException($request, $e);
        } catch (Throwable $e) {
            $this->reportException($e = new FatalThrowableError($e));
 
            $response = $this->renderException($request, $e);
        }
 
        $this->app['events']->dispatch(
            new Events\RequestHandled($request, $response)
        );
 
        return $response;
    }
 
    /**
     * Send the given request through the middleware / router.
     *
Arguments
  1. Illuminate\Http\Request {#42
      #json: null
      #convertedFiles: null
      #userResolver: null
      #routeResolver: null
      +attributes: Symfony\Component\HttpFoundation\ParameterBag {#44}
      +request: Symfony\Component\HttpFoundation\ParameterBag {#50}
      +query: Symfony\Component\HttpFoundation\ParameterBag {#50}
      +server: Symfony\Component\HttpFoundation\ServerBag {#46}
      +files: Symfony\Component\HttpFoundation\FileBag {#47}
      +cookies: Symfony\Component\HttpFoundation\ParameterBag {#45}
      +headers: Symfony\Component\HttpFoundation\HeaderBag {#48}
      #content: null
      #languages: null
      #charsets: null
      #encodings: null
      #acceptableContentTypes: array:1 [
        0 => "*/*"
      ]
      #pathInfo: null
      #requestUri: null
      #baseUrl: null
      #basePath: null
      #method: null
      #format: null
      #session: null
      #locale: null
      #defaultLocale: "en"
      -preferredFormat: null
      -isHostValid: true
      -isForwardedValid: true
      pathInfo: "/san-pham/d57-bo-binh-tra-ma-vang-22-karat-xuat-xu-duc"
      requestUri: "/san-pham/d57-bo-binh-tra-ma-vang-22-karat-xuat-xu-duc?add-to-cart=1050"
      baseUrl: ""
      basePath: ""
      method: "GET"
      format: "html"
    }
    
*/
 
$app = require_once __DIR__ . '/../bootstrap/app.php';
 
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
 
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
 
$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);
 
$response->send();
 
$kernel->terminate($request, $response);
 
 
Arguments
  1. Illuminate\Http\Request {#42
      #json: null
      #convertedFiles: null
      #userResolver: null
      #routeResolver: null
      +attributes: Symfony\Component\HttpFoundation\ParameterBag {#44}
      +request: Symfony\Component\HttpFoundation\ParameterBag {#50}
      +query: Symfony\Component\HttpFoundation\ParameterBag {#50}
      +server: Symfony\Component\HttpFoundation\ServerBag {#46}
      +files: Symfony\Component\HttpFoundation\FileBag {#47}
      +cookies: Symfony\Component\HttpFoundation\ParameterBag {#45}
      +headers: Symfony\Component\HttpFoundation\HeaderBag {#48}
      #content: null
      #languages: null
      #charsets: null
      #encodings: null
      #acceptableContentTypes: array:1 [
        0 => "*/*"
      ]
      #pathInfo: null
      #requestUri: null
      #baseUrl: null
      #basePath: null
      #method: null
      #format: null
      #session: null
      #locale: null
      #defaultLocale: "en"
      -preferredFormat: null
      -isHostValid: true
      -isForwardedValid: true
      pathInfo: "/san-pham/d57-bo-binh-tra-ma-vang-22-karat-xuat-xu-duc"
      requestUri: "/san-pham/d57-bo-binh-tra-ma-vang-22-karat-xuat-xu-duc?add-to-cart=1050"
      baseUrl: ""
      basePath: ""
      method: "GET"
      format: "html"
    }
    

Environment & details:

Key Value
add-to-cart
"1050"
empty
empty
empty
empty
Key Value
USER
"lemp"
HOME
"/home/lemp"
HTTP_CF_IPCOUNTRY
"US"
HTTP_CDN_LOOP
"cloudflare"
HTTP_CF_CONNECTING_IP
"44.221.43.208"
HTTP_REFERER
"https://nhakho.vn/san-pham/d57-bo-binh-tra-ma-vang-22-karat-xuat-xu-duc/?add-to-cart=1050"
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
HTTP_CF_VISITOR
"{"scheme":"https"}"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_CF_RAY
"866bf96caeff58d2-IAD"
HTTP_X_FORWARDED_FOR
"44.221.43.208"
HTTP_ACCEPT_ENCODING
"gzip, br"
HTTP_CONNECTION
"Keep-Alive"
HTTP_HOST
"nhakho.vn"
SCRIPT_FILENAME
"/home/lemp/www/nhakho.vn/sourcecode/public/index.php"
REDIRECT_STATUS
"200"
SERVER_NAME
"nhakho.vn"
SERVER_PORT
"443"
SERVER_ADDR
"150.95.113.130"
REMOTE_PORT
"23620"
REMOTE_ADDR
"172.70.134.93"
SERVER_SOFTWARE
"nginx/1.17.7"
GATEWAY_INTERFACE
"CGI/1.1"
HTTPS
"on"
REQUEST_SCHEME
"https"
SERVER_PROTOCOL
"HTTP/1.1"
DOCUMENT_ROOT
"/home/lemp/www/nhakho.vn/sourcecode/public"
DOCUMENT_URI
"/index.php"
REQUEST_URI
"/san-pham/d57-bo-binh-tra-ma-vang-22-karat-xuat-xu-duc?add-to-cart=1050"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
"add-to-cart=1050"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1710835703.9286
REQUEST_TIME
1710835703
APP_NAME
"NHAKHO"
APP_ENV
"production"
APP_DEBUG
"true"
APP_CACHE
"true"
APP_INSTALLED
"true"
APP_EDITOR
"vscode"
APP_KEY
"base64:mgozNv/VR4z9hZICHJkOVo2glCWZoaz8nYvh0EOa46o="
APP_URL
"https://nhakho.vn"
HOSTNAME
"nhakho.vn"
APP_LOG
"single"
LOG_CHANNEL
"stack"
DB_CONNECTION
"mysql"
DB_HOST
"127.0.0.1"
DB_PORT
"3306"
DB_DATABASE
"nhakho"
DB_USERNAME
"root"
DB_PASSWORD
"H@noi2020"
DB_PREFIX_SETTING
""
GROUP_WEB
"1945_,qualac_,kimgiay_,loico_"
QUEUE_DRIVER
"sync"
CACHE_DRIVER
"file"
SESSION_DRIVER
"file"
FILESYSTEM_DRIVER
"public_storage"
REDIS_HOST
"127.0.0.1"
REDIS_PASSWORD
"null"
REDIS_PORT
"6379"
MAIL_DRIVER
"smtp"
MAIL_HOST
"smtp.mailtrap.io"
MAIL_PORT
"2525"
MAIL_USERNAME
"null"
MAIL_PASSWORD
"null"
MAIL_FROM_ADDRESS
"null"
MAIL_FROM_NAME
"null"
MAIL_ENCRYPTION
"null"
SCOUT_QUEUE
"false"
DEBUGBAR_ENABLED
"false"
QUERY_DETECTOR_ENABLED
"false"
Key Value
APP_NAME
"NHAKHO"
APP_ENV
"production"
APP_DEBUG
"true"
APP_CACHE
"true"
APP_INSTALLED
"true"
APP_EDITOR
"vscode"
APP_KEY
"base64:mgozNv/VR4z9hZICHJkOVo2glCWZoaz8nYvh0EOa46o="
APP_URL
"https://nhakho.vn"
HOSTNAME
"nhakho.vn"
APP_LOG
"single"
LOG_CHANNEL
"stack"
DB_CONNECTION
"mysql"
DB_HOST
"127.0.0.1"
DB_PORT
"3306"
DB_DATABASE
"nhakho"
DB_USERNAME
"root"
DB_PASSWORD
"H@noi2020"
DB_PREFIX_SETTING
""
GROUP_WEB
"1945_,qualac_,kimgiay_,loico_"
QUEUE_DRIVER
"sync"
CACHE_DRIVER
"file"
SESSION_DRIVER
"file"
FILESYSTEM_DRIVER
"public_storage"
REDIS_HOST
"127.0.0.1"
REDIS_PASSWORD
"null"
REDIS_PORT
"6379"
MAIL_DRIVER
"smtp"
MAIL_HOST
"smtp.mailtrap.io"
MAIL_PORT
"2525"
MAIL_USERNAME
"null"
MAIL_PASSWORD
"null"
MAIL_FROM_ADDRESS
"null"
MAIL_FROM_NAME
"null"
MAIL_ENCRYPTION
"null"
SCOUT_QUEUE
"false"
DEBUGBAR_ENABLED
"false"
QUERY_DETECTOR_ENABLED
"false"
0. Whoops\Handler\PrettyPageHandler