ReviewOS

also looking at this

meemalabs/laravel-meema

Collection Response

#5
Merged glennmichael123 wants to merge collection-response into main
7 files +42 -51

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

config/config.phpmodified+5-0
Changes to config/config.php
@@ -5,4 +5,9 @@ return [
55 * The publishable API key provided by the meema API
66 */
77 'api_key' => env('MEEMA_API_KEY', ''),
8
9 /*
10 * If you want to convert all response to a collection
11 */
12 'to_collection' => env('MEEMA_API_TO_COLLECTION', true),
813];
src/MeemaFacade.phpdeleted+0-21
Changes to src/MeemaFacade.php
@@ -1,21 +0,0 @@
1<?php
2
3namespace Meema\LaravelMeema;
4
5use Illuminate\Support\Facades\Facade;
6
7/**
8 * @see \Meema\LaravelMeema\MeemaClass
9 */
10class MeemaFacade extends Facade
11{
12 /**
13 * Get the registered name of the component.
14 *
15 * @return string
16 */
17 protected static function getFacadeAccessor()
18 {
19 return 'meema';
20 }
21}
src/Providers/MeemaServiceProvider.phpmodified+4-1
Changes to src/Providers/MeemaServiceProvider.php
@@ -53,7 +53,10 @@ class MeemaServiceProvider extends ServiceProvider
5353 protected function registerMeemaClient()
5454 {
5555 $this->app->singleton('meema', function ($app) {
56 $config = ['base_url' => config('meema.meema_test_url')];
56 $config = [
57 'base_url' => config('meema.meema_test_url'),
58 'to_collection' => config('meema.to_collection')
59 ];
5760
5861 return new Client(config('meema.api_key'), $config);
5962 });