-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(System): configuration option firebase to store data #35
Conversation
7f3c0fb
to
0f1404e
Compare
src/Services/FirebaseService.php
Outdated
*/ | ||
public function getDataByCode($code) | ||
{ | ||
$reference = $this->getRetrievingData(GGConfig::REFERENCE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REFERENCE
=> SYSTEM_REFERENCE
src/Models/GGConfig.php
Outdated
if (empty($configInfo)) { | ||
$firebaseService->addData(GGConfig::REFERENCE, $attributes); | ||
} else { | ||
if (getKeyByCode($code)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elseif ($key = getKeyByCode($code))
$firebaseService->setData(GGConfig::REFERENCE . '/' . $key, $attributes);
src/Services/FirebaseService.php
Outdated
* @param string $reference | ||
* @return object | ||
*/ | ||
public function getRetrievingData($reference = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getRetrievingData
=> retrieveData
or getData
src/Resources/views/config.blade.php
Outdated
$config = env('STORE_DB', 'database') == 'database' | ||
? getConfigByCode($field['code']) | ||
: app('GGPHP\Config\Services\FirebaseService')->getDataByCode($field['code']); | ||
$value = $config ? $config['value'] : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$value = $config ? $config['value'] : null;
=> $value = $config['value'] ?? null
- composer require kreait/laravel-firebase - php artisan route:cache see #34
0f1404e
to
ae0e7be
Compare
composer require kreait/laravel-firebase
php artisan route:cache
see #34