Giter Site home page Giter Site logo

fisayoafolayan / news-app Goto Github PK

View Code? Open in Web Editor NEW
34.0 5.0 17.0 472 KB

A Laravel app that gathers top news across multiple news sites.

Home Page: https://newsapi.fisayoafolayan.com

PHP 95.04% Vue 0.60% Shell 0.93% Blade 3.43%
api laravel php herokuapp

news-app's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

news-app's Issues

error in laravel, any programmer online, i request fro your help

app = $app; $this->files = $files; $this->manifestPath = $manifestPath; } /** * Register the application service providers. * * @param array $providers * @return void */ public function load(array $providers) { $manifest = $this->loadManifest(); // First we will load the service manifest, which contains information on all // service providers registered with the application and which services it // provides. This is used to know which services are "deferred" loaders. if ($this->shouldRecompile($manifest, $providers)) { $manifest = $this->compileManifest($providers); } // Next, we will register events to load the providers for each of the events // that it has requested. This allows the service provider to defer itself // while still getting automatically loaded when a certain event occurs. foreach ($manifest['when'] as $provider => $events) { $this->registerLoadEvents($provider, $events); } // We will go ahead and register all of the eagerly loaded providers with the // application so their services can be registered with the application as // a provided service. Then we will set the deferred service list on it. foreach ($manifest['eager'] as $provider) { $this->app->register($provider); } $this->app->addDeferredServices($manifest['deferred']); } /** * Load the service provider manifest JSON file. * * @return array|null */ public function loadManifest() { // The service manifest is a file containing a JSON representation of every // service provided by the application and whether its provider is using // deferred loading or should be eagerly loaded on each request to us. if ($this->files->exists($this->manifestPath)) { $manifest = $this->files->getRequire($this->manifestPath); if ($manifest) { return array_merge(['when' => []], $manifest); } } } /** * Determine if the manifest should be compiled. * * @param array $manifest * @param array $providers * @return bool */ public function shouldRecompile($manifest, $providers) { return is_null($manifest) || $manifest['providers'] != $providers; } /** * Register the load events for the given provider. * * @param string $provider * @param array $events * @return void */ protected function registerLoadEvents($provider, array $events) { if (count($events) < 1) { return; } $this->app->make('events')->listen($events, function () use ($provider) { $this->app->register($provider); }); } /** * Compile the application service manifest file. * * @param array $providers * @return array */ protected function compileManifest($providers) { // The service manifest should contain a list of all of the providers for // the application so we can compare it on each request to the service // and determine if the manifest should be recompiled or is current. $manifest = $this->freshManifest($providers); foreach ($providers as $provider) { $instance = $this->createProvider($provider); // When recompiling the service manifest, we will spin through each of the // providers and check if it's a deferred provider or not. If so we'll // add it's provided services to the manifest and note the provider. if ($instance->isDeferred()) { foreach ($instance->provides() as $service) { $manifest['deferred'][$service] = $provider; } $manifest['when'][$provider] = $instance->when(); } // If the service providers are not deferred, we will simply add it to an // array of eagerly loaded providers that will get registered on every // request to this application instead of "lazy" loading every time. else { $manifest['eager'][] = $provider; } } return $this->writeManifest($manifest); } /** * Create a fresh service manifest data structure. * * @param array $providers * @return array */ protected function freshManifest(array $providers) { return ['providers' => $providers, 'eager' => [], 'deferred' => []]; } /** * Write the service manifest file to disk. * * @param array $manifest * @return array * * @throws \Exception */ public function writeManifest($manifest) { if (! is_writable(dirname($this->manifestPath))) { throw new Exception('The bootstrap/cache directory must be present and writable.'); } $this->files->put( $this->manifestPath, ' []], $manifest); } /** * Create a new provider instance. * * @param string $provider * @return \Illuminate\Support\ServiceProvider */ public function createProvider($provider) { return new $provider($this->app); } } when i run php artisan serve, it shows the error below In ProviderRepository.php line 53: Argument 1 passed to Illuminate\Foundation\ProviderR epository::load() must be of the type array, null gi ven, called in C:\wamp64\www\news-app\vendor\laravel \framework\src\Illuminate\Foundation\Application.php on line 549 and defined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.