Skip to content
Snippets Groups Projects
Commit 1a0bf1c5 authored by gazandi's avatar gazandi
Browse files

refactor

parent b9f30d8e
No related merge requests found
Pipeline #1186 skipped
<?php
namespace Controllers;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Redirect;
class BaseController extends Controller
{
/**
* The layout used by the controller.
*
* @var \Illuminate\View\View
*/
protected $layout = 'layouts.main';
/**
* Create a new BaseController instance.
*
* @return void
*/
public function __construct()
{
$this->beforeFilter('csrf', [ 'on' => 'post' ]);
}
/**
* Setup the layout used by the controller.
*
* @return void
*/
protected function setupLayout()
{
if (! is_null($this->layout)) {
$this->layout = View::make($this->layout);
}
}
/**
* Set the specified view as content on the layout.
*
* @param string $path
* @param array $data
* @return void
*/
protected function view($path, $data = [])
{
$this->layout->content = View::make($path, $data);
}
/**
* Redirect to the specified named route.
*
* @param string $route
* @param array $params
* @param array $data
* @return \Illuminate\Http\RedirectResponse
*/
protected function redirectRoute($route, $params = [], $data = [])
{
return Redirect::route($route, $params)->with($data);
}
/**
* Redirect back with old input and the specified data.
*
* @param array $data
* @return \Illuminate\Http\RedirectResponse
*/
protected function redirectBack($data = [])
{
return Redirect::back()->withInput()->with($data);
}
/**
* Redirect a logged in user to the previously intended url.
*
* @param mixed $default
* @return \Illuminate\Http\RedirectResponse
*/
protected function redirectIntended($default = null)
{
return Redirect::intended($default);
}
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en" class="">
<head>
<meta charset="utf-8" />
<title>WALL-S | @yield('title')
</title>
<meta name="description" content="Wall-S" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<link rel="stylesheet" href="../../libs/assets/animate.css/animate.css" type="text/css" />
<link rel="stylesheet" href="../../libs/assets/font-awesome/css/font-awesome.min.css" type="text/css" />
<link rel="stylesheet" href="../../libs/assets/simple-line-icons/css/simple-line-icons.css" type="text/css" />
<link rel="stylesheet" href="../../libs/jquery/bootstrap/dist/css/bootstrap.css" type="text/css" />
<link rel="stylesheet" href="css/font.css" type="text/css" />
<link rel="stylesheet" href="css/style.css" type="text/css" />
</head>
<body>
@section('header')
@show
@section('sidebar')
@show
<div class="container">
@yield('content')
</div>
<script src="../libs/jquery/jquery/dist/jquery.js"></script>
<script src="../libs/jquery/bootstrap/dist/js/bootstrap.js"></script>
<script src="js/ui-load.js"></script>
<script src="js/ui-jp.config.js"></script>
<script src="js/ui-jp.js"></script>
<script src="js/ui-nav.js"></script>
<script src="js/ui-toggle.js"></script>
<script src="js/ui-client.js"></script>
</body>
</html>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment