Getting Value Inside Bracket Using preg_match Function

First we need to compose and declare some pattern.

$pattern = "/(\\(\\')(\\s*.*)(\\'\\))/";

Then using preg_replace function we can get the value inside bracket on array return. Below is the full code example.

$pattern = "/(\\(\\')(\\s*.*)(\\'\\))/"; 
$value = "foo('bar')";
preg_match($pattern, $value, $matches); 
$result = $matches[2];

Codespire Dokumen - Responsive Markdown Viewer

Codespire Dokumen - Responsive Markdown Viewer

Dokumen is drop-in Markdown document viewer, with minimal setup you can create a beautiful document site from Markdown document and upload it online or use in your application distribution.

Get The Latest Git Tag in Repository

The command will return the most recent single tag in git repository.

git describe --tags `git rev-list --tags --max-count=1`

More detail at Coderwall

Laravel ODBC Driver Package

I have release an optimize ODBC library package for Laravel 4.1+ which can be install easily through composer by adding below line in your existing composer.json file

"wajatimur/odbc-driver": "dev-master"

You can get detail at below links;



Laravel Config Package Override in Workbench

This example show how to add config override of any package in others package or workbench. You have to put this code in your register method in you service provider.

// Get config loader
$loader = $this->app['config']->getLoader();

// Get environment name
$env = $this->app['config']->getEnvironment();

// Add package namespace with path set base on your requirement
$loader->addNamespace('basset', __DIR__.'/../config/basset');

// Load package override config file
$configs = $loader->load($env,'config','basset');

// Override value

Source : Coderwall