Exemplo n.º 1
0
 /**
  * @param string|null $key
  * @param null $default
  * @return mixed|\Efriandika\LaravelSettings\Facades\Settings
  */
 function settings($key = null, $default = null)
 {
     if (is_null($key)) {
         return app('settings');
     }
     return Settings::get($key, $default);
 }
Exemplo n.º 2
0
 public function postSettings(Request $request)
 {
     Settings::set('ranking_ignore_roles', $request->ranking_ignore_roles);
     Settings::set('ranking_ignore_factions', $request->ranking_ignore_factions);
     flash()->success(trans('main.settings_saved'));
     return redirect('admin/ranking/settings');
 }
Exemplo n.º 3
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(Request $request)
 {
     foreach ($request->except('_token') as $key => $value) {
         Settings::set('app.' . $key, $value);
     }
     return redirect()->back();
 }
 /**
  * Save the settings in the database
  *
  * @param Request $request
  * @return \Illuminate\Http\RedirectResponse
  */
 public function postSettings(Request $request)
 {
     $this->validate($request, ['server_name' => 'required|min:5']);
     Settings::set('server_name', $request->server_name);
     flash()->success(trans('system.success'));
     return redirect()->back();
 }
Exemplo n.º 5
0
 /**
  * Save the settings to the database
  *
  * @param Request $request
  * @return \Illuminate\Http\RedirectResponse
  */
 public function postSettings(Request $request)
 {
     $this->validate($request, ['server_name' => 'required|min:5', 'currency_name' => 'required|min:3', 'server_ip' => 'required|ip', 'server_version' => 'required', 'encryption_type' => 'required']);
     Settings::set('server_name', $request->server_name);
     Settings::set('currency_name', $request->currency_name);
     Settings::set('server_ip', $request->server_ip);
     Settings::set('server_version', $request->server_version);
     Settings::set('encryption_type', $request->encryption_type);
     return redirect()->route('admin.installer.complete')->with('message', ['message' => trans('system.success'), 'status' => 'success']);
 }
Exemplo n.º 6
0
 public function postSettings(Request $request)
 {
     $this->validate($request, ['teleport_world_tag' => 'required|numeric|min:1', 'teleport_x' => 'required|numeric|min:1', 'teleport_y' => 'required|numeric|min:1', 'teleport_z' => 'required|numeric|min:1', 'level_cap' => 'required|numeric|min:1']);
     Settings::set('teleport_world_tag', $request->teleport_world_tag);
     Settings::set('teleport_x', $request->teleport_x);
     Settings::set('teleport_y', $request->teleport_y);
     Settings::set('teleport_z', $request->teleport_z);
     Settings::set('level_up_cap', $request->level_cap);
     flash()->success(trans('main.settings_saved'));
     return redirect('admin/services/settings');
 }
Exemplo n.º 7
0
 public function postSettings(Request $request)
 {
     $this->validate($request, ['server_name' => 'required|min:5', 'currency_name' => 'required|min:3', 'server_ip' => 'required|ip', 'server_version' => 'required', 'encryption_type' => 'required']);
     Settings::set('server_name', $request->server_name);
     Settings::set('currency_name', $request->currency_name);
     Settings::set('server_ip', $request->server_ip);
     Settings::set('server_version', $request->server_version);
     Settings::set('encryption_type', $request->encryption_type);
     flash()->success(trans('system.success'));
     return redirect()->back();
 }
Exemplo n.º 8
0
 public function postPaymentwallSettings(Request $request)
 {
     $this->validate($request, ['paymentwall_link' => 'required', 'paymentwall_key' => 'required']);
     Settings::set('paymentwall_double', $request->paymentwall_double);
     if (str_contains($request->paymentwall_link, 'iframe')) {
         preg_match('/src="([^"]+)"/', $request->paymentwall_link, $match);
         Settings::set('paymentwall_link', $match[1]);
     }
     Settings::set('paymentwall_key', $request->paymentwall_key);
     flash()->success(trans('main.settings_saved'));
     return redirect('admin/donate/settings');
 }
Exemplo n.º 9
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $this->info('Refresh migration');
     $this->call('migrate:refresh');
     $this->info('Seed permission...');
     $this->call('acl:sync-permission');
     $this->info('Setup default application settings');
     Settings::set('app.name', 'Application Name');
     Settings::set('app.description', 'Application Description');
     $this->info('Create root account');
     $this->createRoot();
     $this->seed();
 }
Exemplo n.º 10
0
 /**
  * @param $key
  * @param null $default
  * @return mixed|\Efriandika\LaravelSettings\Facades\Settings
  */
 function settings($key, $default = null)
 {
     return Settings::get($key, $default);
 }
Exemplo n.º 11
0
 /**
  * Save the settings to the database
  *
  * @param Request $request
  * @return \Illuminate\Http\RedirectResponse
  */
 public function postSettings(Request $request)
 {
     $this->validate($request, ['server_name' => 'required|min:5']);
     Settings::set('server_name', $request->server_name);
     return redirect()->route('admin.installer.complete')->with('message', ['message' => trans('system.success'), 'status' => 'success']);
 }
Exemplo n.º 12
0
 function settings_set($key, $default)
 {
     return Settings::set($key, $default);
 }
Exemplo n.º 13
0
 public function postChatSettings(Request $request)
 {
     Settings::set('chat_log_path', $request->log_path);
     flash()->success(trans('main.settings_saved'));
     return redirect('admin/management/chat/watch');
 }
Exemplo n.º 14
0
 public function postSettings(Request $request)
 {
     Settings::set('shop_items_per_page', $request->items_per_page);
     flash()->success(trans('main.settings_saved'));
     return redirect('admin/shop');
 }