App\Http\Controllers\AccountController::saveCustomizeDesign PHP Method

saveCustomizeDesign() private method

private saveCustomizeDesign ( ) : Illuminate\Http\RedirectResponse
return Illuminate\Http\RedirectResponse
    private function saveCustomizeDesign()
    {
        if (Auth::user()->account->hasFeature(FEATURE_CUSTOMIZE_INVOICE_DESIGN)) {
            $account = Auth::user()->account;
            $account->custom_design = Input::get('custom_design');
            $account->invoice_design_id = CUSTOM_DESIGN;
            $account->save();
            Session::flash('message', trans('texts.updated_settings'));
        }
        return Redirect::to('settings/' . ACCOUNT_CUSTOMIZE_DESIGN);
    }

Usage Example

 public function doSection($section = ACCOUNT_COMPANY_DETAILS)
 {
     if ($section === ACCOUNT_COMPANY_DETAILS) {
         return AccountController::saveDetails();
     } elseif ($section === ACCOUNT_USER_DETAILS) {
         return AccountController::saveUserDetails();
     } elseif ($section === ACCOUNT_LOCALIZATION) {
         return AccountController::saveLocalization();
     } elseif ($section === ACCOUNT_IMPORT_EXPORT) {
         return AccountController::importFile();
     } elseif ($section === ACCOUNT_MAP) {
         return AccountController::mapFile();
     } elseif ($section === ACCOUNT_NOTIFICATIONS) {
         return AccountController::saveNotifications();
     } elseif ($section === ACCOUNT_EXPORT) {
         return AccountController::export();
     } elseif ($section === ACCOUNT_INVOICE_SETTINGS) {
         return AccountController::saveInvoiceSettings();
     } elseif ($section === ACCOUNT_INVOICE_DESIGN) {
         return AccountController::saveInvoiceDesign();
     } elseif ($section === ACCOUNT_CUSTOMIZE_DESIGN) {
         return AccountController::saveCustomizeDesign();
     } elseif ($section === ACCOUNT_TEMPLATES_AND_REMINDERS) {
         return AccountController::saveEmailTemplates();
     } elseif ($section === ACCOUNT_PRODUCTS) {
         return AccountController::saveProducts();
     } elseif ($section === ACCOUNT_TAX_RATES) {
         return AccountController::saveTaxRates();
     }
 }
All Usage Examples Of App\Http\Controllers\AccountController::saveCustomizeDesign