Skip to content

Instantly share code, notes, and snippets.

@adriano-sena
adriano-sena / webpack.mx.js
Created October 21, 2022 23:52
Laravel mix
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applications. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
@adriano-sena
adriano-sena / create.blade.php
Created October 21, 2022 21:51
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>
@adriano-sena
adriano-sena / README-TEMPLATE.md
Created July 26, 2022 19:25 — forked from reginadiana/README-TEMPLATE.md
Template sugestivo para documentação de projetos

Titulo ou Arte do Projeto

@adriano-sena
adriano-sena / pivot-tables.md
Created July 19, 2020 13:42 — forked from Braunson/pivot-tables.md
Laravel 6.x - Diving into Pivot Tables

Laravel 6 - Diving Into Pivot Tables

Pivot tables can be confusing and a little hard to wrap your head around at first. In this quick article we are going to dive into what a pivot table is, how to create one and finally how to use the pivot table. Let's dive in!

What is a pivot table?

A pivot table is used to connect relationships between two tables. Laravel provides a Many To Many relationship where you can use a pivot table.

Criando pacotes em PHP

Caso você esteja pensando em criar um pacote em php, este guia pode ajuda-lo. Principalmente se este pacote for open source.

Pré-requisitos

Para conseguir alcançar seu objetivo, recomendo que você estude alguns pontos antes de avançar: