Let's say that we're going to create the errorsmaster.blade.php file, then, we fill the content as a standard page, but with some Blade exceptions
Here is the code that I'm using in OxyBB
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>OxyBB - @yield('title')</title>
<link href="//fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
<style>
html, body {
height: 100%;
}
body {
margin: 0;
padding: 0;
width: 100%;
color: #B0BEC5;
display: table;
font-weight: 100;
font-family: 'Lato';
}
.container {
text-align: center;
display: table-cell;
vertical-align: middle;
}
.content {
text-align: center;
display: inline-block;
}
.description {
font-size: 72px;
margin-bottom: 40px;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<div class="description">@yield('description')</div>
</div>
</div>
</body>
</html>
Now, as it's supposed to show on the HTTP errors (404,403, etc) you create a new blade file in views/errors/ with the name of the error, let's say it's 404.blade.php
And now, as you're going to use the code that you already wrote extending it, you just put the next code in your file
Code:
@extends('layouts.errorsmaster')
@section('title', '404 Error')
@section('description')
Content not found, noob
@endsection
And your result is the page
It's a vague description of the potential of blade, but it's awesome.