Skip to content

Updating Module Features

This guide explains how to update and modify existing module features, including custom fields, module settings, templates, and frontend display.


Table of Contents

  1. Overview
  2. Modifying Existing Fields
  3. Updating Module Settings
  4. Changing Module Behavior
  5. Updating Templates
  6. Customizing Frontend Display
  7. Best Practices

Overview

What Can Be Updated

  • ✅ Custom field settings
  • ✅ Module configurations
  • ✅ Display templates
  • ✅ Frontend layouts
  • ✅ Validation rules
  • ✅ Field order and visibility

Prerequisites

  • Access to admin panel
  • Appropriate permissions
  • Understanding of current features
  • Backup before major changes

Modifying Existing Fields

Editing Custom Fields

Step 1: Access Field

  1. Navigate to Custom Fields:
    • Go to module
    • Click Custom Fields
    • Find field to edit

Step 2: Edit Field

  1. Click Edit:
    • Click Edit button on field
    • Edit form opens

Step 3: Modify Settings

What Can Be Changed:

  • Label: Display name
  • Type: Field type (with caution)
  • Required: Required status
  • Placeholder: Placeholder text
  • Default Value: Default value
  • Help Text: Instructions
  • Visibility: Public/Private/Admin
  • Order: Display order

What to Be Careful With:

  • Field Type: Changing type may affect existing data
  • Key: Changing key may break references
  • Required: Making required may affect existing records

Step 4: Save Changes

  1. Review Changes:

    • Verify all changes correct
    • Check for warnings
  2. Save:

    • Click Update
    • Changes saved
    • Applied immediately

Updating Field Validation

Modify Validation Rules

  1. Edit Field:

    • Open field for editing
    • Find validation section
  2. Update Rules:

    • Change min/max values
    • Update patterns
    • Modify custom rules
  3. Test Validation:

    • Test with valid data
    • Test with invalid data
    • Verify error messages

Updating Module Settings

Accessing Module Settings

Route: /admin/module-settings/{key}

  1. Navigate to Module Settings:
    • Go to SettingsModule Settings
    • Click on module
    • Or navigate directly

Modifying Settings

General Settings

What Can Be Changed:

  • Module Name: Display name
  • Description: Module description
  • Status: Enabled/Disabled
  • Order: Display order

Feature Settings

Examples:

  • Posts Module:

    • Enable/disable comments
    • Toggle featured posts
    • Enable post scheduling
  • Products Module:

    • Inventory tracking
    • Variants enabled
    • Digital products
  • Courses Module:

    • Enrollment type
    • Progress tracking
    • Certificates

Saving Changes

  1. Make Changes:

    • Modify settings
    • Toggle features
    • Update configurations
  2. Save:

    • Click Save or Update
    • Settings saved
    • Changes applied
  3. Clear Cache:

    • Click Clear Cache (if needed)
    • Ensures changes take effect

Changing Module Behavior

Modifying Controllers

Adding New Actions

  1. Edit Controller:

    • Open controller file
    • Add new method
  2. Add Route:

    • Add route in routes/admin.php
    • Define route name
  3. Create View:

    • Create view file
    • Add functionality

Modifying Existing Actions

  1. Edit Controller Method:

    • Open method
    • Modify logic
    • Update functionality
  2. Test Changes:

    • Test functionality
    • Verify behavior
    • Check for errors

Updating Models

Adding Relationships

  1. Edit Model:

    • Open model file
    • Add relationship method
  2. Update Migrations:

    • Add foreign keys if needed
    • Run migrations

Adding Scopes

  1. Edit Model:

    • Add scope method
    • Define query logic
  2. Use Scope:

    • Use in controllers
    • Apply to queries

Updating Templates

Admin Templates

Modifying Admin Views

Location: resources/js/Pages/Admin/{Module}/

What Can Be Changed:

  • Layout: Page layout
  • Forms: Form structure
  • Lists: List display
  • Styling: CSS classes

Best Practices

  1. Backup Templates:

    • Copy original templates
    • Keep backups
    • Document changes
  2. Test Changes:

    • Test in development
    • Verify functionality
    • Check styling

Frontend Templates

Modifying Frontend Views

Location: resources/js/Pages/Frontend/

What Can Be Changed:

  • Layout: Page layout
  • Styling: CSS classes
  • Components: Component usage
  • Content: Display content

Customization Options

  1. CSS Customization:

    • Add custom CSS
    • Override styles
    • Use design settings
  2. Template Overrides:

    • Override templates
    • Customize display
    • Add custom content

Customizing Frontend Display

Display Customization

Field Display

Options:

  • Show/Hide Fields: Control visibility
  • Field Order: Change display order
  • Field Formatting: Custom formatting
  • Field Labels: Custom labels

Layout Customization

Options:

  • Grid Layout: Change grid structure
  • List Layout: Modify list display
  • Card Layout: Customize cards
  • Detail Layout: Customize detail pages

CSS Customization

Adding Custom Styles

  1. Go to Design Settings:

    • Navigate to SettingsDesign
    • Find Custom CSS section
  2. Add CSS:

    • Write custom CSS
    • Target specific elements
    • Apply styles
  3. Save:

    • Click Save CSS
    • Styles applied
    • Visible immediately

Best Practices

Before Making Changes

  1. Backup:

    • Backup database
    • Backup files
    • Document current state
  2. Plan Changes:

    • Plan modifications
    • Consider impact
    • Test in development
  3. Document:

    • Document changes
    • Note reasons
    • Keep change log

During Updates

  1. Test Thoroughly:

    • Test all functionality
    • Check edge cases
    • Verify data integrity
  2. Incremental Changes:

    • Make small changes
    • Test after each
    • Build up gradually
  3. Monitor:

    • Watch for errors
    • Check logs
    • Monitor performance

After Updates

  1. Verify:

    • Verify changes work
    • Check all features
    • Test user experience
  2. Clear Cache:

    • Clear application cache
    • Clear view cache
    • Refresh browser
  3. Update Documentation:

    • Update documentation
    • Note changes
    • Update guides

Troubleshooting

Changes Not Appearing

Solutions:

  1. Clear cache
  2. Refresh browser
  3. Check file permissions
  4. Verify changes saved
  5. Check for errors

Functionality Broken

Solutions:

  1. Review changes
  2. Check error logs
  3. Restore from backup
  4. Test incrementally
  5. Get help if needed

Data Issues

Solutions:

  1. Check data integrity
  2. Verify migrations
  3. Review relationships
  4. Check validation
  5. Restore if needed


Last Updated: [Date will be updated during final review]

Released under the MIT License.