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

Controller Callback Bundle Laravel Package

chrisjohnson00/controller-callback-bundle

View on GitHub
Deep Wiki
Context7

ControllerCallbackBundle

A Symfony 2 bundle which adds the ability to configure a controller function call before or after the action is called

Continuous Integration

Build Status Scrutinizer Code Quality Code Coverage

Installation

Installation by Composer

Add ControllerCallbackBundle bundle as a dependency to the composer.json of your application

"require": {
    ...
    "chrisjohnson00/controller-callback-bundle": "dev-master"
    ...
},

Or on the command line with composer require chrisjohnson00/controller-callback-bundle

Add ControllerCallbackBundle to your application kernel.

// app/AppKernel.php
<?php
    // ...
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new ChrisJohnson00\ControllerCallbackBundle\ChrisJohnson00ControllerCallbackBundle(),
        );
    }

Example Usage

    <route id="quest_read" pattern="/api/quest/{id}" methods="GET">
        <default key="repository">FTWGuildBundle:Quest</default>
        <default key="type">read</default>
        <default key="_controller">FTWGuildBundle:Api:index</default>
        <default key="preActionMethod">setRouteParameters</default>
    </route>

The above will result in calling the Api controller method named setRouteParameters by passing in an associative array of all keys (including the id in the uri)

The setRouteParameters method may look something like

    public function setRouteParameters(array $parameters)
    {
        $this->setRepository($parameters['repository']);
        $this->setType($parameters['type']);
        if (isset($parameters['id']))
            $this->setId($parameters['id']);
    }
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.
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui