Skip to content

Instantly share code, notes, and snippets.

@adriano-sena
Created October 21, 2022 21:51
Show Gist options
  • Save adriano-sena/c844f35c0c97c502ee4af9c45203b47a to your computer and use it in GitHub Desktop.
Save adriano-sena/c844f35c0c97c502ee4af9c45203b47a to your computer and use it in GitHub Desktop.
Modelo Blade Layout
<x-layout title="nova serie">
<form action="/series/salvar" method="post">
@csrf
<div class="mb-3">
<label for="nome" class="form-label">Nome:</label>
<input type="text" id="nome" name="nome" class="form-control">
</div>
<button type="submit" class="btn btn-primary">Adicionar</button>
</form>
</x-layout>
<x-layout title="Séries">
<a href="/series/criar" class="btn btn-dark mb-2">Adicionar</a>
<ul class="list-group">
@foreach ($series as $serie)
<li class="list-group-item">{{ $serie->nome }}</li>
@endforeach
</ul>
</x-layout>
<!doctype html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{ $title }} </title>
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
</head>
<body>
<div class="container">
<h1>{{ $title }}</h1>
{{ $slot }}
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment