public function index() { //check user session if (!$this->validSession) { $logo = SysConfig::where('type', 'SystemSettings')->where('key', 'crm-company-logo')->first()->value; $company_name = SysConfig::where('type', 'SystemSettings')->where('key', 'crm-company-name')->first()->value; $bg = SysConfig::where('type', 'SystemSettings')->where('key', 'crm-login-bg-image')->first()->value; $home_url = SysConfig::where('type', 'SystemSettings')->where('key', 'crm-home-url')->first()->value; $title = SysConfig::where('type', 'SystemSettings')->where('key', 'crm-login-title')->first()->value; //return view ... return view('backend.common.loginv1')->with('logo', $logo)->with('bg', $bg)->with('title', $title)->with('company_name', $company_name); } $home_url = SysConfig::where('type', 'SystemSettings')->where('key', 'crm-home-url')->first()->value; //redirect to inner site return Redirect::intended($home_url); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $sys_icons = SysConfig::where('type', 'Icons')->get(); return view('backend.sysconfig.sys_icon_index')->with('content_title', 'System Icons')->with('sys_icons', $sys_icons)->with('module', $this->module); }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { try { $inputs = $request->all(); unset($inputs['_method']); unset($inputs['_token']); foreach ($inputs as $key => $value) { SysConfig::where('type', 'SystemPermissionPositionType')->where('key', $key)->update(['value' => $value]); } return Redirect::to('/crm/permission_pos_type')->withMessage(Generate::success_message('Success', 'Updated Successfully.')); } catch (Exception $e) { return Redirect::to('/crm/permission_pos_type')->withMessage(Generate::error_message('Fail', 'Failed to update.')); } }
public function createPermission($fid) { $feature = Feature::find($fid); if (!isset($feature)) { return Redirect::to('/crm/feature')->withMessage(Generate::message('Invalid', 'Invalid Feature or Feature has been deleted')); } $all_positions = Permission::getAllCurrentPosition(); $icons = SysConfig::getSystemConfig('Icons'); $icon_bgs = SysConfig::getSystemConfig('IconBG'); $all_pages = Permission::getAllCurrentPages(); $all_prompt_types = Permission::getAllCurrentPromptTypes(); return view('backend.feature.create_permission')->with('content_title', 'Create New Permission')->with('feature', $feature)->with('icons', $icons)->with('icon_bgs', $icon_bgs)->with('all_prompt_types', $all_prompt_types)->with('all_pages', $all_pages)->with('all_positions', $all_positions)->with('module', $this->module); }
public static function getSystemConfig($type) { return SysConfig::whereNull('deleted_at')->where('type', $type)->get(); }
public static function getNavTop($id) { $home_url = ""; $company_name = ""; $company_logo = ""; $return = []; $home_url = SysConfig::where('type', 'SystemSettings')->where('key', 'crm-home-url')->first()->value; $company_name = SysConfig::where('type', 'SystemSettings')->where('key', 'crm-company-name')->first()->value; $company_logo = SysConfig::where('type', 'SystemSettings')->where('key', 'crm-company-logo-sm')->first()->value; //get user $user = User::find($id); $member_since = date_format($user->created_at, 'Y-M-d'); $profile_functions = '/crm/profile'; //for the data schema for the top navigation $return = ['home_url' => $home_url, 'company_name' => $company_name, 'company_logo' => $company_logo, 'user_image' => $user->display_image, 'user_name' => $user->display_name, 'member_since' => $member_since, 'profile_functions' => $profile_functions]; return Generate::returnMsg('200', 'Success', $return); }