Skip to content

Instantly share code, notes, and snippets.

View NandoKstroNet's full-sized avatar
🎯
Focusing

Nando Kstro Net NandoKstroNet

🎯
Focusing
View GitHub Profile
@NandoKstroNet
NandoKstroNet / SignInUpController.php
Last active January 26, 2022 16:16
Tela de Registro e Login da Loja Tenancy com Laravel em https://codeexperts.com.br/curso/laravel-tenancy-1
<?php
namespace App\Http\Controllers\Front;
use App\Http\Controllers\Controller;
use App\Models\Store;
use App\Models\User;
use App\Services\AuthenticateService;
use App\Services\RegisterService;
use Illuminate\Http\Request;
@NandoKstroNet
NandoKstroNet / Player.php
Created February 2, 2022 03:59
Área do Player Projeto VideoFlix - Segundo Bloco Curso de Laravel, Laravel Mastery em https://laravelmastery.com.br
<?php
namespace App\Http\Livewire;
use Livewire\Component;
use App\Models\Content;
class Player extends Component
{
public $videos;
@NandoKstroNet
NandoKstroNet / Contents.php
Last active February 2, 2022 21:21
Área dos meus conteúdos Projeto VideoFlix Curso Laravel Mastery em https://laravelmastery.com.br
<?php
namespace App\Http\Livewire;
use Livewire\Component;
use App\Models\Content;
class Contents extends Component
{
public Content $content;
@NandoKstroNet
NandoKstroNet / comments.blade.php
Last active February 4, 2022 16:14
View do Componente Livewire de Comentários projeto VideoFlix em https://laravelmastery.com.br
<div class="p-10 w-full mt-20 pt-10 border-t border-gray-600">
<div class="w-2/3">
<h3 class="text-white font-extrabold text-2xl mb-10">Deixar um comentário ou questão.</h3>
<form action="">
<div class="w-full mb-10">
<textarea name="" id="" cols="30" rows="10" class="w-full rounded"></textarea>
</div>
<button class="px-4 py-2 text-white font-bold bg-green-800 rounded">Criar</button>
</form>
</div>
@NandoKstroNet
NandoKstroNet / Checkout.php
Created April 29, 2022 17:38
Trechos de códigos para uso do Cashier + Stripe em nossa aplicação Laravel do curso Laravel Mastery - https://laravelmastery.com.br
<?php
protected $listeners = ['charge'];
public function charge($paymentMethodId)
{
//dd($paymentMethodId);
$user = User::find(1);
@NandoKstroNet
NandoKstroNet / Favorite.php
Created May 31, 2022 23:08
Componente Botão Favorito Livewire - Laravel Mastery https://laravelmastery.com.br
<?php
//Model Content
protected $fillable = ['user_id'];
public function favoriteable()
{
return $this->morphTo();
}
@NandoKstroNet
NandoKstroNet / SingleVideoProcessedProgress.php
Created June 3, 2022 01:21
Componente para trackear o processamento do video no projeto VideoFlix em https://laravelmastery.com.br
<?php
namespace App\Http\Livewire\Content\Video;
use App\Models\Video;
use Livewire\Component;
class SingleVideoProcessedProgress extends Component
{
public $video;
@NandoKstroNet
NandoKstroNet / contents.blade.php
Created July 8, 2022 21:33
Tela Categorizada de Conteúdos do Usuário https://laravelmastery.com.br
<div class="max-w-7xl mx-auto mt-10 py-6 px-4 sm:px-6 lg:px-8">
@foreach($contents->groupBy('type') as $type => $contentArr)
<div class="w-full border-b border-white mb-10 pb-2"><strong class="text-white text-xl"> {{$type == 1 ? 'Filmes' : 'Series' }}</strong></div>
<div class="w-full md:grid md:grid-cols-2 lg:grid-cols-3 md:gap-0.5 mb-10">
@foreach($contentArr as $content)
<div class="lg:w-88 xl:w-96 mb-8 bg-gray-900 rounded shadow-lg hover:p-4">
@NandoKstroNet
NandoKstroNet / customer-subscription.blade.php
Created July 24, 2022 06:35
Área de Invoices Cliente Projeto VideoFlix em https://laravelmastery.com.br
<div class="max-w-7xl mx-auto mt-10 py-6 px-4 sm:px-6 lg:px-8">
<x-slot name="header">Minha Assinatura</x-slot>
<div class="rounded bg-gray-800 p-2">
<table class="min-w-full divide-y divide-gray-200">
<thead>
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-white uppercase tracking-wider">Data Cobrança</th>
<th class="px-6 py-3 text-left text-xs font-medium text-white uppercase tracking-wider">Valor Cobrado</th>
@NandoKstroNet
NandoKstroNet / cancel-subscription.blade.php
Created July 25, 2022 02:12
Componente Cancelar Assinatura VideoFlix Laravel Mastery, curso de Laravel do Zero em https://laravelmastery.com.br
<div class="mr-4" x-data="">
<a href="#" @click="$event.preventDefault();
if(!confirm('Têm certeza que deseja cancelar sua Assinatura?')) { return false; }
else { $wire.cancelSubscription() }"
class="px-4 py-2 border-red-900 bg-red-400 hover:bg-red-800
transition ease-in-out duration-300 text-white font-bold rounded">Cancelar</a>
</div>