Skip to content

Instantly share code, notes, and snippets.

$packer = new DVDoug\BoxPacker\InfalliblePacker();
$packer->addBox(new DVDoug\BoxPacker\Test\TestBox(1, 225, 283, 165, 249, 206, 259, 151, 15876));
$packer->addBox(new DVDoug\BoxPacker\Test\TestBox(2, 320, 368, 251, 363, 295, 339, 231, 15876));
$packer->addBox(new DVDoug\BoxPacker\Test\TestBox(3, 206, 460, 105, 227, 189, 425, 95, 15876));
$packer->addBox(new DVDoug\BoxPacker\Test\TestBox(4, 470, 473, 327, 658, 434, 437, 301, 15876));
$packer->addBox(new DVDoug\BoxPacker\Test\TestBox(5, 333, 613, 156, 476, 307, 567, 141, 15876));
$packer->addBox(new DVDoug\BoxPacker\Test\TestBox(6, 333, 613, 308, 567, 307, 567, 284, 15876));
$packer->addBox(new DVDoug\BoxPacker\Test\TestBox(7, 473, 692, 378, 1089, 437, 641, 349, 15876));

This gist was made for Laravel 5.7, although it should work for any version. It also assumes you have a Laravel site set up and configured on a basic level (you ran composer install, npm install, created an app key, etc).

  1. Run npm install stimulus

  2. Run npm install babel-plugin-transform-class-properties --save-dev

  3. Create .babelrc file in your project root, and paste in the following content:

{
<?php
namespace App;
use Illuminate\Http\Request;
use Illuminate\Mail\Message;
use Illuminate\Support\Facades\Password;
trait ResetsPasswords
{