Open sidebar
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Support\Facades\Cookie; use Illuminate\Support\Facades\Config; class OptionsListing { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { $options_name = 'options_admin'; if(Cookie::has($options_name)){ $options = Cookie::get(str_getcsv($options_name), 'false'); Config::set('options_admin', $options); } else { $options['options_admin']['good_list']['active'] = 1; $options['options_admin']['good_list']['no_active'] = 1; Config::set('options_admin', $options); } return $next($request); } }
Close sidebar
Back
Please note that all pasted data is publicly available.
Twitter
GitHub
Use setting
Back
Please note that all pasted data is publicly available.
Twitter
GitHub
Use setting