Created
September 28, 2023 14:46
-
-
Save wallacemaxters/10827c6005c9d1f63db56b995094fd1e to your computer and use it in GitHub Desktop.
Templates prédefinidos para utilizar em um novo projeto Laravel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@props([ | |
'bodyClass' => null, | |
'htmlClass' => '2xl:text-base lg:text-sm text-sm leading-normal', | |
'head' => null, | |
'title' => null, | |
'canonical' => url()->current(), | |
'description' => null, | |
'image' => null, | |
]) | |
<!DOCTYPE html> | |
<html lang="pt-br" @class($htmlClass)> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>{{ $title ? sprintf('%s | %s', $title, config('app.name')) : config('app.name') }}</title> | |
<!-- SEO --> | |
<link rel="canonical" href="{{ $canonical }}"> | |
<meta property="og:title" content="{{ $title }}"> | |
<meta property="og:url" content="{{ $canonical }}"> | |
<meta property="og:type" content="website"> | |
<meta property="og:description" content="{{ $description }}"> | |
@if($image) | |
<meta property="og:image" content="{{ $image }}"> | |
@endif | |
<meta name="description" content="{{ str($description)->limit(170) }}"> | |
<!-- /SEO --> | |
{{ $head ?? '' }} | |
</head> | |
<body @class($bodyClass)> | |
{{ $slot }} | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Utilização:
Coloque o arquivo dentro da pasta
resources/views/components
do seu projeto Laravel.Em seguida, chame na sua view.