Exemplo n.º 1
0
 /**
  * Get Settings.
  *
  * @param string $key
  *
  * @return string/Setting
  */
 function setting($key = null)
 {
     static $setting = null;
     if (!$setting) {
         $setting = Setting::firstOrFail();
     }
     if (!$key) {
         return $setting;
     }
     return $setting->{$key};
 }
Exemplo n.º 2
0
 public function createSetting()
 {
     $this->log('<comment>~ Creating Setting</comment>');
     $setting = \ZEDx\Models\Setting::firstOrFail();
     $setting->website_name = $this->post('website_name', 'ZEDx');
     $setting->website_url = $this->getBaseUrl();
     $setting->website_title = $this->post('website_title', 'ZEDx');
     $setting->website_description = $this->post('website_description', 'Classifieds CMS');
     $setting->save();
     $this->log('<info>[ + ] Creating Setting [ OK ]</info>');
 }
Exemplo n.º 3
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Setting::create(['website_name' => 'ZEDx', 'website_url' => 'https://demo.zedx.io', 'website_title' => 'Titre', 'website_description' => 'Description', 'website_tracking_code' => '', 'language' => 'fr', 'social_auths' => json_encode($this->getDefaultProviders()), 'currency' => 'EUR', 'default_ad_currency' => 'EUR', 'ad_descr_min' => 10, 'ad_descr_max' => 150, 'tell_me_payment_received' => 3, 'tell_me_new_user' => 3, 'tell_me_new_ads' => 3, 'tell_me_edit_ads' => 3, 'tell_me_renew_ads' => 3, 'tell_me_payment_ads' => 3, 'tell_me_new_payment_subscr' => 3, 'tell_client_ad_accepted' => 1, 'tell_client_ad_refused' => 1, 'tell_client_ad_deleted' => 1, 'tell_client_ad_expired' => 1, 'new_user_welcome_message' => 1, 'tell_client_ad_type_changed' => 1, 'tell_client_new_subscr' => 1]);
 }