Skip to content

Instantly share code, notes, and snippets.

View leandroruel's full-sized avatar

Leandro RR leandroruel

View GitHub Profile
@leandroruel
leandroruel / card.blade.php
Last active August 19, 2019 18:19
creating a bootstrap 4 accordion component using laravel @component and @slot directive
<?php
<div class="card">
<div class="card-header"
@isset($cardHeadingId)
id="{{ $cardHeadingId }}"
@endisset
>
<h2 class="mb-0">
<button
@leandroruel
leandroruel / upload.js
Created September 24, 2019 19:26
A js file to use Uppy file uploads with laravel-mix
const Uppy = require('@uppy/core');
const XHRUpload = require('@uppy/xhr-upload');
const Dashboard = require('@uppy/dashboard');
const PortuguesBR = require('@uppy/locales/lib/pt_BR');
/**
* Cria uma instância do plugin Uppy
* @param {String|Object} options objeto com algumas opções do plugin
*/
window.uploadFiles = (options) => {
@leandroruel
leandroruel / cyberpunkbuttons.html
Created February 27, 2020 17:20
Cyberpunk 2077 Buttons CSS
<!doctype html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>Cyberpunk 2077 Buttons CSS</title>
</head>
<body>
<button class="btn">
<span class="btn__content">Get your copy now_</span>
<span class="btn__glitch"></span>
@leandroruel
leandroruel / Select2Formatter.php
Last active May 11, 2020 00:18
trait that uses eloquent to convert any array to select2 plugin data source: https://select2.org/data-sources/formats
<?php
namespace App\Traits;
trait Select2Formatter
{
/**
* Format your array to the format used by select2 plugin using eloquent
*
* @param array $data