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 / ListVideo.php
Created January 3, 2022 11:33
Componente List Video Curso Laravel Mastery em https://laravelmastery.com.br
<?php
namespace App\Http\Livewire\Content\Video;
use App\Models\Content;
use Livewire\Component;
class ListVideo extends Component
{
public $videos;
@NandoKstroNet
NandoKstroNet / EditVideo.php
Last active January 3, 2022 11:31
Componente Edit Vídeo - Curso Laravel Mastery em https://laravelmastery.com.br
<?php
namespace App\Http\Livewire\Content\Video;
use Livewire\Component;
use App\Models\Video;
use Livewire\WithFileUploads;
class EditVideo extends Component
{
@NandoKstroNet
NandoKstroNet / notifications.blade.php
Created December 27, 2021 22:15
Snippet Exibição de Notificações no Laravel curso Laravel Mastery em https://laravelmastery.com.br
@foreach(auth()->user()->unreadNotifications as $notification)
<div class="w-full flex bg-white py-2 px-10 rounded mb-10 border border-gray-300">
<div>
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 mr-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" />
</svg>
</div>
<div>
{{isset($notification->data['message']) ? $notification->data['message'] : $notification->data['extra'] }}
@NandoKstroNet
NandoKstroNet / form-exemplo.html
Created November 28, 2021 02:34
Exemplo de inputs em formulários HTML. Código para apoio no curso PHP Mastery em https://phpmastery.com.br
<html>
<head>
<title>Formulário Html</title>
</head>
<body>
<h1>Formulário HTML</h1>
<hr>
<!--
@NandoKstroNet
NandoKstroNet / DatabaseSeeder.php
Created November 27, 2021 00:04
Factories e Seeder para criação de alguns dados fakes para teste do projeto Meus Gastos criado no curso Livewire na Prática. Em http://codeexperts.com.br/curso/livewire-na-pratica
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
@NandoKstroNet
NandoKstroNet / video-create.blade.php
Created November 17, 2021 22:14
Camada de View Componente Livewire Video Create, do curso Laravel Mastery em http://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">Upload de Vídeo(s)</x-slot>
<form action="">
<div class="w-full"
x-data="{ isUploading: false, progress: 0 }"
x-on:livewire-upload-start="isUploading = true"
@NandoKstroNet
NandoKstroNet / VideoCreate.php
Created November 17, 2021 22:08
Componente Livewire Video Create, projeto VideoFlix do curso Laravel Mastery em https://laravelmastery.com.br
<?php
namespace App\Http\Livewire\Content;
use Livewire\{
WithFileUploads,
Component
};
use App\Models\Content;
@NandoKstroNet
NandoKstroNet / ffmpeg-codde-example.php
Created November 17, 2021 22:00
Trecho de Processamento de Video em HLS para nosso projeto VideoFlix do curso Laravel Mastery em https://laravelmastery.com.br
<?php
$video = 'videos/Q4tdrMHQLB4mJ3mR2BzgbIaWNoa5rHB19rOtTpVf.mp4';
$videoProcessed = 'processed/Q4tdrMHQLB4mJ3mR2BzgbIaWNoa5rHB19rOtTpVf.m3u8';
$lowBitrateFormat = (new X264)->setKiloBitrate(500);
$midBitrateFormat = (new X264)->setKiloBitrate(1500);
$highBitrateFormat = (new X264)->setKiloBitrate(3000);
@NandoKstroNet
NandoKstroNet / welcome.blade.php
Created November 6, 2021 20:58
Tela Inicial do Nosso Projeto de Registro de Entradas e Saídas com Livewire, do curso Livewire na Prática em https://codeexperts.com.br/curso/livewire-na-pratica
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet">
@NandoKstroNet
NandoKstroNet / expense-monitor.blade.php
Last active November 22, 2021 22:59
Exibição das somas das saidas e entradas e balanço da nossa dashboard. Curso Livewire na Prática em http://codeexperts.com.br/curso/livewire-na-pratica
<div class="w-full flex justify-between p-5">
<div class="w-1/4 h-20 p-15 bg-green-600 text-white text-2xl font-extrabold flex flex-col justify-center items-center rounded">
<strong>Entrada</strong><br>
R$ {{isset($expenseCount[1]) ? number_format($expenseCount[1], 2, ',', '.') : 0 }}
</div>
<div class="w-1/4 h-20 p-15 bg-red-600 text-white text-2xl font-extrabold flex flex-col justify-center items-center rounded">
<strong>Saída</strong><br>