Skip to content

Instantly share code, notes, and snippets.

View Maelstromeous's full-sized avatar
🏠
Working from home

Matt Cavanagh Maelstromeous

🏠
Working from home
View GitHub Profile
<?php
// This line needs to be called after initialize but before run
$app['upload'] = $app->extend(
'upload',
function ($handler, $app) {
if ($app['request']->get('contenttype') && $app['request']->get('id')) {
$handler->setPrefix("/{$app['request']->get('contenttype')}/{$app['request']->get('id')}/");
}