Weave 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

Basebundle Laravel Package

bluebear/basebundle

View on GitHub
Deep Wiki
Context7

BaseBundle

BaseBundle for Symfony2 projects. This bundle contains some shortcuts and code snippets to ease Symfony2 projects developpment.

Installation

php composer.phar require bluebear/basebundle

Getting started

BaseBundle offers some features to help you :

ControllerTrait

<?php
...
use BlueBear\BaseBundle\Behavior\ControllerTrait;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class MyController extends Controller {
    use ControllerTrait;
    
    ...

Your controller should have following methods (those methods are native in Symfony Controller):

public function createNotFoundException($message = 'Not Found', Exception $previous = null)
public function generateUrl($route, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) 

ControllerTrait has following methods :

  • forward404Unless($condition, $message = '404 Not Found') : Forward current request to a 404 page if $condition is false
  • redirect($url, $status = 302) : Redirect to an url or a route (for route use "@my_route")
  • setMessage($message, $type = 'info', $parameters = []) : Add a flash message with a type and translations parameters
  • getConfig($key) : Return configuration key $key from container parameters
  • getRouting() : Return router service
  • getTranslator() : Return translator service
  • getSession() : Return session service
  • getEventDispatcher() : Return event dispatcher service
  • getEntityManager() : Return entity manager service
  • translate($string, $parameters = []) : Return entity manager service

ContainerTrait

ContainerTrait has following methods :

  • getContainer() : Return Container service
  • setContainer() : Set Container service

EntityManagerTrait

EntityManagerTrait has following methods :

  • getEntityManager() : Return EntityManager service
  • setEntityManager() : Set EntityManager service

ManagerTrait

...

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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package