Files
snipe-it/app/controllers/BaseController.php
T
2014-06-24 17:49:39 -04:00

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);
}
}
}