Skip to content

Instantly share code, notes, and snippets.

@farindra
Last active April 1, 2021 23:08
Show Gist options
  • Save farindra/c693154c1ce635e96a7d11070a7f032e to your computer and use it in GitHub Desktop.
Save farindra/c693154c1ce635e96a7d11070a7f032e to your computer and use it in GitHub Desktop.
Lumen base controller
<?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