public function checkResources($force = false)
    {
        if (! ($resources = $this->getCachedResources($force))->isEmpty()) {
            return $resources;
        }

        if (! $this->allResourcesAreGood()) {
            return $this->resources = collect();
        }

        $resources = $this->sortResources(
            $this->getNonGlobalResources()
                ->each(function ($resource) {
                    $this->checkResource($resource);
                })
                ->merge(
                    $this->getGlobalResources()->each(function ($resource) {
                        return $resource->checkGlobal($this->getResources());
                    })
                )
        );

        $this->checked = true;

        return $this->resources = $this->cache->cacheResources($resources);
    }
public function checkResources($force = false)
    {
        if (! ($resources = $this->getCachedResources($force))->isEmpty()) {
            return $resources;
        }

        if (! $this->allResourcesAreGood()) {
            return $this->resources = collect();
        }

        $resources = $this->sortResources(
            $this->getNonGlobalResources()
                ->each(function ($resource) {
                    $this->checkResource($resource);
                })
                ->merge(
                    $this->getGlobalResources()->each(function ($resource) {
                        return $resource->checkGlobal($this->getResources());
                    })
                )
        );

        $this->checked = true;

        return $this->resources = $this->cache->cacheResources($resources);
    }
public function checkResources ( $ force = false ) { if ( ! ( $ resources = $ this -> getCachedResources ( $ force ) ) -> isEmpty ( ) ) { return $ resources ; } if ( ! $ this -> allResourcesAreGood ( ) ) { return $ this -> resources = collect ( ) ; } $ resources = $ this -> sortResources ( $ this -> getNonGlobalResources ( ) -> each ( function ( $ resource ) { $ this -> checkResource ( $ resource ) ; } ) -> merge ( $ this -> getGlobalResources ( ) -> each ( function ( $ resource ) { return $ resource -> checkGlobal ( $ this -> getResources ( ) ) ; } ) ) ) ; $ this -> checked = true ; return $ this -> resources = $ this -> cache -> cacheResources ( $ resources ) ; }
Check all resources.

@param bool $force
@return \Illuminate\Support\Collection
@throws Exception
Check all resources .