Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

C3 Bundle Laravel Package

chapter-three-company/c3-bundle

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation Add the package via Composer:

    composer require chapter-three-company/c3-bundle
    

    Publish the default configuration:

    php artisan vendor:publish --provider="CHAPTERTHREECOMPANY\C3Bundle\C3BundleServiceProvider" --tag="config"
    
  2. Environment Configuration Define Twig parameters in .env:

    STISLA_TITLE="My Admin Dashboard"
    STISLA_SITE_NAME="My Company"
    STISLA_VERSION="1.0.0"
    STISLA_MENU_LONG="MyApp"
    STISLA_MENU_SHORT="MA"
    STISLA_GA_TRACKING_ID="UA-XXXXXX"
    
  3. First Use Case Extend your base layout in resources/views/layouts/app.blade.php:

    {% extends 'c3-bundle::page.html' %}
    {% block title %}{{ app.config.stisla.title }}{% endblock %}
    

Implementation Patterns

Core Workflows

  1. Theming & Layouts

    • Override default templates by placing them in resources/views/vendor/c3-bundle/.
    • Use Twig blocks to customize sections:
      {% block content %}
          {{ include('my_custom_content') }}
      {% endblock %}
      
  2. Dynamic Menus Leverage the menu_long/menu_short config for consistent branding:

    <div class="brand-logo">
        {{ app.config.stisla.menu_long }}
    </div>
    
  3. Turbo Mode Enable Turbo for SPA-like navigation:

    // config/c3-bundle.php
    'turbo' => env('STISLA_TURBO', false),
    

    Then use Turbo links in Twig:

    <a href="{{ path('dashboard') }}" data-turbo="true">Dashboard</a>
    
  4. Google Analytics Inject tracking ID dynamically:

    {% if app.config.stisla.ga_tracking_id %}
        <script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments)}; gtag('js', new Date()); gtag('config', '{{ app.config.stisla.ga_tracking_id }}');</script>
    {% endif %}
    

Integration Tips

  • Laravel Mix: Use the turbo config to conditionally load Turbo-compatible JS:
    if (process.env.MIX_STISLA_TURBO) {
        require('turbo-drive');
    }
    
  • Blade + Twig: For hybrid projects, use Blade::render() in Twig templates:
    {{ Blade::render('partials._header') }}
    

Gotchas and Tips

Common Pitfalls

  1. Configuration Overrides

    • Issue: .env values not updating.
    • Fix: Clear config cache after changes:
      php artisan config:clear
      
  2. Template Caching

    • Issue: Twig templates not reflecting changes.
    • Fix: Disable caching in config/view.php or use:
      php artisan view:clear
      
  3. Turbo Conflicts

    • Issue: Turbo links breaking existing JS.
    • Fix: Ensure data-turbo="false" on non-Turbo links.

Debugging Tips

  • Inspect Config:
    dd(config('stisla')); // Check loaded values
    
  • Twig Debug: Enable in config/view.php:
    'debug' => env('APP_DEBUG', true),
    

Extension Points

  1. Custom Templates

    • Override page.html for full control:
      cp vendor/chapter-three-company/c3-bundle/resources/views/page.html resources/views/vendor/c3-bundle/page.html
      
  2. Dynamic Config Extend the config class:

    // app/Providers/C3ServiceProvider.php
    use CHAPTERTHREECOMPANY\C3Bundle\Config\StislaConfig;
    
    class C3ServiceProvider extends ServiceProvider {
        public function boot() {
            $this->app->singleton(StislaConfig::class, function () {
                return new class extends StislaConfig {
                    public function getCustomValue() {
                        return 'dynamic_value';
                    }
                };
            });
        }
    }
    
  3. Asset Management Publish assets for customization:

    php artisan vendor:publish --tag="public"
    

    Then override in public/vendor/c3-bundle/.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui