update('settings',[ 'title' => $post['title'], 'value' => $post['value'] ]); /* */ /* DB::update('settings',[ 'logo' => $logo_path, 'favicon' => $favicon_path, 'title' => $post['title'], 'siteurl' => $post['siteurl'], 'description' => $post['description'], 'keywords' => $post['keywords'], 'author' => $post['author'], 'email' => $post['email'] , 'facebook' => $post['facebook'], 'twitter' => $post['twitter'], 'instagram' => $post['instagram'], 'linkedin' => $post['linkedin'], 'youtube' => $post['youtube'], 'github' => $post['github'], 'telegram' => $post['telegram'], 'discord' => $post['discord'], 'slogan' => $post['slogan'], 'smtphost' => $post['smtphost'], 'smtpuser' => $post['smtpuser'], 'smtppassword' => $post['smtppassword'], 'smtpport' => $post['smtpport'], 'theme' => $post['theme'], 'yas' => $post['yas'], ]); */ //echo DB::Error(); redirect('setting'); } function logo_update(){ if($_FILES["logo"]["name"]){ unlink(pathinfo($_SERVER['SCRIPT_FILENAME'],PATHINFO_DIRNAME).'/'.settings('logo')); Upload::settings([ 'encode' => false, 'prefix' => 'logo-', 'extensions' => 'jpg|jpeg|png', ])->target('upload')->start('logo'); $logo_path = Upload::info()->path; }else{ $logo_path = setting('logo'); } DB::where('title', 'logo')->update('settings',[ 'value' => $logo_path, ]); } function favicon_update(){ if($_FILES["favicon"]["name"]){ unlink(pathinfo($_SERVER['SCRIPT_FILENAME'],PATHINFO_DIRNAME).'/'.settings('favicon')); Upload::settings([ 'encode' => false, 'prefix' => 'fav-', 'extensions' => 'ico', ])->target('upload')->start('favicon'); $favicon_path = Upload::info()->path; }else{ $favicon_path = setting('favicon'); } DB::where('title', 'favicon')->update('settings',[ 'value' => $favicon_path, ]); } function theme_update(){ DB::where('title', 'theme')->update('settings',[ 'value' => $post['theme'], ]); } }// class sonu