Last active
April 1, 2021 23:08
-
-
Save farindra/c693154c1ce635e96a7d11070a7f032e to your computer and use it in GitHub Desktop.
Lumen base controller
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 app\Http\Controllers; | |
use App\Http\Controllers\Controller; | |
use app\Libraries\Core; | |
use Illuminate\Http\Request; | |
class BaseController extends Controller | |
{ | |
/** | |
* our application library | |
*/ | |
public $core ; | |
public function __construct(Request $request){ | |
/** define Core as global Library */ | |
$this->core = new Core(); | |
} | |
/** | |
* handling missing Method | |
* | |
* @return mixed | |
*/ | |
public function missingMethod(){ | |
return $this->core->setResponse(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment