I hereby claim:
- I am franzliedke on github.
- I am franzliedke (https://keybase.io/franzliedke) on keybase.
- I have a public key ASCIl-d4IqRn--938agJUfKwIrfZIE3AuWWMxb2Jmh5_2wo
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', |
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| class SomeModel extends Eloquent | |
| { | |
| public function scopeSomething(Builder $query, $something) | |
| { | |
| // This will properly set up a binding | |
| return $query->where('something', $something); | |
| } | |
| <?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 Group extends Eloquent | |
| { | |
| protected $table = 'groups'; | |
| public function users() | |
| { | |
| return $this->hasMany('User', 'group_id'); | |
| } |
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 | |
| Route::get('{any}', function($url) { | |
| return Redirect::to(mb_substr($url, 0, -1), 301); | |
| })->where('any', '(.*)\/$'); |
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