Skip to content

Instantly share code, notes, and snippets.

@ju5t
ju5t / instructions.md
Last active August 29, 2025 01:27
Livewire enabled TinyMCE blade component

Instructions

This is a very basic TinyMCE component. It uses 'entangle'. This allows you to link a Livewire and Alpine property to eachother. If one value changes, the other does too.

Installation

Add tinymce.blade.php to views/components/input. This can be another component folder too if you prefer, but keep in mind that you should also

@ju5t
ju5t / Transaction.php
Created June 29, 2022 14:38 — forked from Patabugen/Transaction.php
Eloquent Model event hook to allow inserting primary keys into SQL Server tables with IDENTITY_INSERT = off
<?php
trait PrimaryKey
{
protected $primaryKey = 'TransactionID';
public static function bootPrimaryKey()
{
static::creating(function(self $model) {
$pkColumn = $model->primaryKey;
$tableName = $model->table;
<?php
/** @noinspection PhpUnused */
namespace App\Http\Livewire\Traits;
use Exception;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
use Livewire\Component;