39 lines
690 B
PHP
Executable File
39 lines
690 B
PHP
Executable File
<?php
|
|
|
|
class BaseController extends Controller
|
|
{
|
|
/**
|
|
* Message bag.
|
|
*
|
|
* @var Illuminate\Support\MessageBag
|
|
*/
|
|
protected $messageBag = null;
|
|
|
|
/**
|
|
* Initializer.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
// CSRF Protection
|
|
$this->beforeFilter('csrf', array('on' => 'post'));
|
|
|
|
//
|
|
$this->messageBag = new Illuminate\Support\MessageBag;
|
|
}
|
|
|
|
/**
|
|
* Setup the layout used by the controller.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function setupLayout()
|
|
{
|
|
if ( ! is_null($this->layout)) {
|
|
$this->layout = View::make($this->layout);
|
|
}
|
|
}
|
|
|
|
}
|