This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
<?php | |
Route::get('{any}', function($url) { | |
return Redirect::to(mb_substr($url, 0, -1), 301); | |
})->where('any', '(.*)\/$'); |
In your DokuWiki installation, create a folder lib/plugins/authfluxbb/
and create the two files auth.php
and plugin.info.txt
in it.
In your wiki's conf/local.protected.php
(create this file if it does not exist), add the following lines:
$conf['authtype'] = 'authfluxbb';
$conf['superuser'] = '@Administrators,@Moderators';
// Make sure stripping slashes doesn't clash with the forums.
<?php | |
class Group extends Eloquent | |
{ | |
protected $table = 'groups'; | |
public function users() | |
{ | |
return $this->hasMany('User', 'group_id'); | |
} |
<?php | |
use Illuminate\CompositeMiddleware; | |
class WebGroup extends CompositeMiddleware | |
{ | |
protected $middlewares = [ | |
\App\Http\Middleware\EncryptCookies::class, | |
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, | |
\Illuminate\Session\Middleware\StartSession::class, |
<?php | |
class SomeModel extends Eloquent | |
{ | |
public function scopeSomething(Builder $query, $something) | |
{ | |
// This will properly set up a binding | |
return $query->where('something', $something); | |
} | |
I hereby claim:
To claim this, I am signing this object:
<?php | |
require 'vendor/autoload.php'; | |
use Illuminate\Database\Capsule\Manager as Capsule; | |
$capsule = new Capsule; | |
$capsule->addConnection([ | |
'driver' => 'mysql', |