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

Framework Laravel Package

bungle/framework

Laravel framework components and utilities for building PHP web applications, providing common helpers and structure for routing, configuration, events, and more as part of the bungle ecosystem.

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation Add the package via Composer:

    composer require bungle-suit/framework
    

    Publish the config file (if available):

    php artisan vendor:publish --provider="Bungle\Provider\BungleServiceProvider"
    
  2. First Use Case Register the service provider in config/app.php under providers:

    Bungle\Provider\BungleServiceProvider::class,
    

    Check the config/bungle.php file for basic configuration (if published).

  3. Basic Usage The package likely provides core utilities (e.g., request handling, middleware, or macros). Start by inspecting:

    • The Bungle facade (if available):
      use Bungle\Facades\Bungle;
      
    • The BungleServiceProvider to see what’s registered (e.g., bindings, aliases, or macros).

Implementation Patterns

Core Workflows

  1. Request/Response Handling If Bungle includes HTTP utilities, use it for:

    • Custom request validation macros:
      use Bungle\Macros\RequestMacros;
      
      RequestMacros::extend('customRule', function ($attribute, $value, $fail) {
          // Custom logic
      });
      
    • Response formatting (e.g., API responses):
      return Bungle::response()->json(['data' => $data], 200);
      
  2. Middleware Integration Attach Bungle middleware to routes or groups:

    Route::middleware(['bungle.auth', 'bungle.log'])->group(function () {
        // Protected routes
    });
    
  3. Service Binding Bind custom services via the provider:

    $this->app->bind('bungle.service', function ($app) {
        return new CustomService();
    });
    

Integration Tips

  • Leverage Facades: Prefer facades for cleaner code (e.g., Bungle::macro()).
  • Extend Macros: Add reusable logic to Laravel’s core classes (e.g., Collection, Request).
  • Event Listeners: Use Bungle’s events (if documented) for decoupled workflows:
    event(new Bungle\Events\CustomEvent($data));
    

Gotchas and Tips

Pitfalls

  1. Undocumented Features

    • The package lacks stars/dependents, so assume minimal community support. Check the src/ directory for undocumented classes/methods.
    • Example: If Bungle::macro() exists but isn’t in the docs, verify its usage via:
      dd(method_exists(Bungle::class, 'macro'));
      
  2. Configuration Quirks

    • No published config? Hardcode defaults in the provider:
      $this->app->singleton('bungle.config', function () {
          return ['key' => 'default_value'];
      });
      
  3. Middleware Conflicts

    • If Bungle middleware clashes with Laravel’s, override in app/Http/Kernel.php:
      protected $middlewareGroups = [
          'web' => [
              \Bungle\Http\Middleware\CustomMiddleware::class,
              // ...
          ],
      ];
      

Debugging Tips

  • Log Macros: Add debug logs to custom macros:
    RequestMacros::extend('debug', function ($request) {
        \Log::debug('Request data:', $request->all());
        return $request;
    });
    
  • Service Container Dump: Inspect bindings:
    php artisan container:dump
    
  • Check for Traits: Bungle may use traits (e.g., HasBungle). Search the codebase for:
    grep -r "trait HasBungle" ./vendor/bungle-suit/framework
    

Extension Points

  1. Custom Macros Extend Laravel’s core classes in a service provider:
    Str::macro('slugify', function ($string) {
        return Str::of($string)->slug('-');
    });
    
  2. Event Subscribers Listen for Bungle events (if any) in EventServiceProvider:
    protected $listen = [
        \Bungle\Events\CustomEvent::class => [
            \App\Listeners\HandleCustomEvent::class,
        ],
    ];
    
  3. Publishable Assets If the package supports views/configs, publish them:
    php artisan vendor:publish --tag=bungle-views
    
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.
craftcms/url-validator
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony