Skip to content

Instantly share code, notes, and snippets.

@pboivin
pboivin / README.md
Created July 17, 2023 17:13
[FilamentPHP] Attaching records using the Repeater field and HasMany

Attaching records using the Repeater field and HasMany

Context

Let's say you want to associate Players to Teams in your application. After reading the Laravel Documentation, you create this database table structure:

teams
    id - integer
 name - string
@pboivin
pboivin / SortTranslations.php
Last active June 13, 2023 15:00
Laravel command to sort JSON translations alphabetically
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class SortTranslations extends Command
{
protected $signature = 'app:sort-translations';
@pboivin
pboivin / vue-inline-component-test.html
Created December 28, 2020 00:47
Vue.js inline component test
<html>
<head>
<title>Vue.js inline component test</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></script>
</head>
<body>
<div inline-component="{
name: 'Bob',
newName: '',