Revize e8ef87aa
Přidáno uživatelem Adam Mištera před téměř 5 roky(ů)
app/Http/Controllers/PagesController.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace App\Http\Controllers; |
|
4 |
|
|
5 |
use Illuminate\Http\Request; |
|
6 |
|
|
7 |
class PagesController extends Controller |
|
8 |
{ |
|
9 |
public function index() |
|
10 |
{ |
|
11 |
return view('pages.index'); |
|
12 |
} |
|
13 |
} |
resources/views/layouts/master.blade.php | ||
---|---|---|
1 |
<!DOCTYPE html> |
|
2 |
<html lang="{{ config('app.locale', 'en') }}"> |
|
3 |
<head> |
|
4 |
<meta charset="utf-8"> |
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|
6 |
|
|
7 |
<title>{{ config('app.name', 'Dev') }} - @yield('title')</title> |
|
8 |
|
|
9 |
<!-- Fonts --> |
|
10 |
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet"> |
|
11 |
|
|
12 |
<!-- Bootstrap --> |
|
13 |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> |
|
14 |
</head> |
|
15 |
<body> |
|
16 |
<nav aria-label="breadcrumb"> |
|
17 |
<ol class="breadcrumb"> |
|
18 |
@yield('breadcrumb') |
|
19 |
</ol> |
|
20 |
</nav> |
|
21 |
|
|
22 |
<div class="container"> |
|
23 |
<div class="content"> |
|
24 |
@yield('content') |
|
25 |
</div> |
|
26 |
|
|
27 |
<hr> |
|
28 |
<footer class="container"> |
|
29 |
© 2020 |
|
30 |
</footer> |
|
31 |
</div> |
|
32 |
</body> |
|
33 |
</html> |
resources/views/pages/index.blade.php | ||
---|---|---|
1 |
@extends('layouts.master') |
|
2 |
|
|
3 |
@section('title', 'Homepage') |
|
4 |
|
|
5 |
@section('breadcrumb') |
|
6 |
<li class="breadcrumb-item active" aria-current="page">Homepage</li> |
|
7 |
@endsection |
|
8 |
|
|
9 |
@section('content') |
|
10 |
<div class="jumbotron"> |
|
11 |
<div class="text-center"> |
|
12 |
<h1>Welcome</h1> |
|
13 |
<p> |
|
14 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. |
|
15 |
Mauris dolor felis, sagittis at, luctus sed, aliquam non, tellus. |
|
16 |
Fusce tellus odio, dapibus id fermentum quis, suscipit id erat. |
|
17 |
Morbi scelerisque luctus velit. Vivamus porttitor turpis ac leo. |
|
18 |
Morbi scelerisque luctus velit. |
|
19 |
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. |
|
20 |
</p> |
|
21 |
</div> |
|
22 |
</div> |
|
23 |
|
|
24 |
<div class="logo"> |
|
25 |
<!-- Add logo here as link to next page --> |
|
26 |
</div> |
|
27 |
@endsection |
routes/web.php | ||
---|---|---|
13 | 13 |
| |
14 | 14 |
*/ |
15 | 15 |
|
16 |
Route::get('/', function () { |
|
17 |
return view('welcome'); |
|
18 |
}); |
|
16 |
Route::get('/', 'PagesController@index'); |
Také k dispozici: Unified diff
Issue #7694 @2h
[+] Vytvoření homepage, nastavení routování
[+] Vytvoření zakladního layout