Last active
June 8, 2020 23:14
-
-
Save nickstewart95/7f3b0279accd751d7bde2f0b40a48dc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Sample; | |
use \Illuminate\Database\Capsule\Manager as Capsule; | |
class Loader { | |
public function init() { | |
$this->initEloquent(); | |
$this->initActions(); | |
$this->initFilters(); | |
} | |
protected function initEloquent() { | |
$params = [ | |
'driver' => 'mysql', | |
'database' => '', | |
'username' => '', | |
'password' => '', | |
'host' => '', | |
'prefix' => 'wp_', | |
'charset' => 'utf8', | |
'collation' => 'utf8_unicode_ci', | |
]; | |
$capsule = new Capsule(); | |
$capsule->addConnection($params, 'default'); | |
$capsule->setAsGlobal(); | |
$capsule->bootEloquent(); | |
} | |
protected function initActions() { | |
} | |
protected function initFilters() { | |
} | |
public function activatePlugin() { | |
} | |
public function deactivatePlugin() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment