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

Kanbanize Client Bundle Laravel Package

chaplean/kanbanize-client-bundle

View on GitHub
Deep Wiki
Context7

Getting Started

Install via Composer:

composer require vendor/package-name

Publish the config (if applicable) and register the service provider in config/app.php. The core functionality revolves around task creation via the postCreateTask method, now enhanced with optional workflow parameters (workflow, workflowid, workflowname).

First Use Case: Trigger a task with workflow context:

use Vendor\Package\Facades\TaskManager;

TaskManager::postCreateTask(
    $request->all(), // Base request data
    workflow: 'approval', // Optional: Specify workflow
    workflowid: 123,    // Optional: Workflow ID
    workflowname: 'Document Approval' // Optional: Workflow name
);

Implementation Patterns

Workflow-Aware Task Creation

Leverage the new optional parameters to tie tasks to workflows:

// In a controller or service
public function handleRequest(Request $request) {
    $taskData = $request->validate([
        'title' => 'required',
        'description' => 'nullable',
    ]);

    TaskManager::postCreateTask(
        $taskData,
        workflow: $request->workflow, // Dynamic workflow selection
        workflowid: $request->workflow_id
    );
}

Integration with Existing Workflows

Use the workflowname parameter for human-readable logging:

TaskManager::postCreateTask(
    $data,
    workflowname: 'Customer Onboarding' // For audit trails
);

Conditional Workflow Assignment

$workflow = auth()->user()->hasRole('admin') ? 'admin_override' : 'default';
TaskManager::postCreateTask($data, workflow: $workflow);

Gotchas and Tips

Parameter Precedence

  • If both workflowid and workflowname are provided, the package prioritizes workflowid for internal processing but retains workflowname for logging.
  • Tip: Use workflowname for UI/UX clarity and workflowid for backend consistency.

Backward Compatibility

  • Existing calls to postCreateTask without workflow parameters remain unchanged.
  • Tip: Use named arguments for clarity in new code:
    TaskManager::postCreateTask($data, workflow: 'value'); // Preferred
    TaskManager::postCreateTask(array_merge($data, ['workflow' => 'value'])); // Legacy
    

Debugging

  • Validate workflow parameters early:
    if (empty($request->workflow) && empty($request->workflow_id)) {
        logger()->warning('Task created without workflow context');
    }
    

Extension Points

  • Override workflow resolution logic by binding a custom WorkflowResolver to the package’s container.
  • Extend task payloads with workflow metadata via service provider booting:
    TaskManager::extend(function ($task) {
        if ($task->workflow) {
            $task->setMetadata('workflow_context', $task->workflow);
        }
    });
    
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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor