Last active
February 2, 2022 21:21
-
-
Save NandoKstroNet/2082dd3bbcc6e568adf333f40bee159e to your computer and use it in GitHub Desktop.
Área dos meus conteúdos Projeto VideoFlix Curso Laravel Mastery em https://laravelmastery.com.br
This file contains hidden or 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
<div class="max-w-7xl mx-auto mt-10 py-6 px-4 sm:px-6 lg:px-8"> | |
<div class="grid grid-cols-3 gap-0.5"> | |
@foreach($contents as $content) | |
<div class="w-96 mb-8 bg-gray-900 rounded shadow-lg hover:p-4"> | |
<img src="{{$content->cover}}" alt="Capa do conteúdo: {{$content->title}}" class="mb-8 rounded-t"> | |
<div class="px-4 pb-4 text-white relative h-64"> | |
<h5 class="font-extrabold text-2xl mb-4">{{$content->title}}</h5> | |
<p class="leading-4 text-xl mb-20">{{$content->description}}</p> | |
<a href="{{route('video.player', $content)}}" class="mt-8 font-bold text-2xl block w-full text-center px-2 py-4 | |
hover:bg-white hover:text-gray-900 rounded transition duration-300 ease-in-out | |
absolute bottom-0.5 left-0 right-0">Assistir</a> | |
</div> | |
</div> | |
@endforeach | |
</div> | |
</div> |
This file contains hidden or 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
<?php | |
namespace App\Http\Livewire; | |
use Livewire\Component; | |
use App\Models\Content; | |
class Contents extends Component | |
{ | |
public Content $content; | |
public function mount(Content $content) | |
{ | |
$this->content = $content; | |
} | |
public function render() | |
{ | |
return view('livewire.contents', [ | |
'contents' => $this->content->paginate(10) | |
])->layout('layouts.my-contents'); | |
} | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="csrf-token" content="{{ csrf_token() }}"> | |
<title>{{ config('app.name', 'Laravel') }}</title> | |
<!-- Fonts --> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap"> | |
<!-- Styles --> | |
<link rel="stylesheet" href="{{ asset('css/app.css') }}"> | |
<!-- Scripts --> | |
<script src="{{ asset('js/app.js') }}" defer></script> | |
@livewireStyles | |
</head> | |
<body class="font-sans antialiased"> | |
<div class="min-h-screen bg-black"> | |
@include('layouts.my-navigation') | |
<!-- Page Content --> | |
<main> | |
{{ $slot }} | |
</main> | |
</div> | |
@livewireScripts | |
</body> | |
</html> |
This file contains hidden or 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
<?php | |
Route::get('/watch/{content:slug}',\App\Http\Livewire\Player::class)->middleware('auth')->name('video.player'); | |
Route::middleware(['auth'])->prefix('my-content')->name('my-content.')->group(function(){ | |
Route::get('/', \App\Http\Livewire\Contents::class)->name('main'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment