Skip to content

Instantly share code, notes, and snippets.

View ptondereau's full-sized avatar
🦧

Pierre Tondereau ptondereau

🦧
View GitHub Profile
@ptondereau
ptondereau / ConfigServiceProvider.php
Last active March 29, 2016 11:13
Laravel redirect sub-domain to a templte
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Request;
class ConfigServiceProvider extends ServiceProvider {
public function register() {
switch (Request::server("HTTP_X_FORWARDED_SERVER")) {
case 'www.site1.com':
$template = 'site1';

Keybase proof

I hereby claim:

  • I am ptondereau on github.
  • I am ptondereau (https://keybase.io/ptondereau) on keybase.
  • I have a public key whose fingerprint is 369E 6E23 2682 7477 DA10 7BA8 B169 A3A4 15E7 C17D

To claim this, I am signing this object: