diff --git a/composer.json b/composer.json index 4fdd101..d8ff5d8 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "ext-imagick": "*", "bnussbau/laravel-trmnl": "^0.1.4", "intervention/image": "^3.11", + "keepsuit/laravel-liquid": "^0.5.2", "laravel/framework": "^12.1", "laravel/sanctum": "^4.0", "laravel/tinker": "^2.10.1", diff --git a/composer.lock b/composer.lock index cc7a360..13a0bcc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "90ca5428e48b0164301a23c8def5593a", + "content-hash": "745994b30a60597808cac7e5e21a2a5a", "packages": [ { "name": "bnussbau/laravel-trmnl", @@ -1277,6 +1277,142 @@ ], "time": "2025-02-27T13:08:55+00:00" }, + { + "name": "keepsuit/laravel-liquid", + "version": "v0.5.2", + "source": { + "type": "git", + "url": "https://github.com/keepsuit/laravel-liquid.git", + "reference": "a5eb4f8752132b1b80c80f3ca08c2da8115b6cc3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/keepsuit/laravel-liquid/zipball/a5eb4f8752132b1b80c80f3ca08c2da8115b6cc3", + "reference": "a5eb4f8752132b1b80c80f3ca08c2da8115b6cc3", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^10.0 || ^11.0 || ^12.0", + "keepsuit/liquid": "^0.7 || ^0.8", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.16", + "symfony/var-exporter": "^6.3 || ^7.0" + }, + "require-dev": { + "itsgoingd/clockwork": "^5.3", + "larastan/larastan": "^3.0", + "laravel/pint": "^1.0", + "mockery/mockery": "^1.6", + "nunomaduro/collision": "^7.8 || ^8.0 || ^9.0", + "orchestra/testbench": "^8.14 || ^9.0 || ^10.0", + "pestphp/pest": "^2.13 || ^3.0", + "pestphp/pest-plugin-arch": "^2.5 || ^3.0", + "pestphp/pest-plugin-laravel": "^2.2 || ^3.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^2.0", + "spatie/laravel-ray": "^1.26" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "Liquid": "Keepsuit\\LaravelLiquid\\Facades\\Liquid" + }, + "providers": [ + "Keepsuit\\LaravelLiquid\\LiquidServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Keepsuit\\LaravelLiquid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabio Capucci", + "email": "f.capucci@keepsuit.com", + "role": "Developer" + } + ], + "description": "Liquid template engine for Laravel", + "homepage": "https://github.com/keepsuit/laravel-liquid", + "keywords": [ + "keepsuit", + "laravel", + "liquid" + ], + "support": { + "issues": "https://github.com/keepsuit/laravel-liquid/issues", + "source": "https://github.com/keepsuit/laravel-liquid/tree/v0.5.2" + }, + "time": "2025-03-15T13:40:26+00:00" + }, + { + "name": "keepsuit/liquid", + "version": "v0.8.0", + "source": { + "type": "git", + "url": "https://github.com/keepsuit/php-liquid.git", + "reference": "50a0f1c6872821fa296c1c4564125b54b98651ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/keepsuit/php-liquid/zipball/50a0f1c6872821fa296c1c4564125b54b98651ef", + "reference": "50a0f1c6872821fa296c1c4564125b54b98651ef", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^8.1" + }, + "require-dev": { + "laravel/pint": "^1.2", + "pestphp/pest": "^2.7", + "pestphp/pest-plugin-arch": "^2.2", + "phpbench/phpbench": "dev-master", + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0", + "spatie/invade": "^2.0", + "spatie/ray": "^1.28", + "symfony/console": "^6.1 || ^7.0", + "symfony/var-exporter": "^6.1 || ^7.0", + "symfony/yaml": "^6.1 || ^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Keepsuit\\Liquid\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabio Capucci", + "email": "f.capucci@keepsuit.com", + "role": "Developer" + } + ], + "description": "PHP implementation of liquid markup language", + "homepage": "https://github.com/keepsuit/php-liquid", + "keywords": [ + "keepsuit", + "liquid" + ], + "support": { + "issues": "https://github.com/keepsuit/php-liquid/issues", + "source": "https://github.com/keepsuit/php-liquid/tree/v0.8.0" + }, + "time": "2025-02-23T13:47:09+00:00" + }, { "name": "laravel/framework", "version": "v12.2.0", @@ -6266,6 +6402,82 @@ ], "time": "2025-01-17T11:39:41+00:00" }, + { + "name": "symfony/var-exporter", + "version": "v7.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "4ede73aa7a73d81506002d2caadbbdad1ef5b69a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/4ede73aa7a73d81506002d2caadbbdad1ef5b69a", + "reference": "4ede73aa7a73d81506002d2caadbbdad1ef5b69a", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "symfony/property-access": "^6.4|^7.0", + "symfony/serializer": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v7.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-02-13T10:27:23+00:00" + }, { "name": "tijsverkoyen/css-to-inline-styles", "version": "v2.3.0", diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index a68d2f9..c04c02f 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -23,9 +23,18 @@ class DatabaseSeeder extends Seeder 'password' => bcrypt('admin@example.com'), ]); + Device::factory(1)->create([ + 'mac_address' => '00:00:00:00:00:00', + 'api_key' => 'test-api-key' + ]); + // Device::factory(5)->create(); // Plugin::factory(3)->create(); + + $this->call([ + ExampleReceiptsSeeder::class, + ]); } } } diff --git a/database/seeders/ExampleReceiptsSeeder.php b/database/seeders/ExampleReceiptsSeeder.php index cc586f8..d1f1b8c 100644 --- a/database/seeders/ExampleReceiptsSeeder.php +++ b/database/seeders/ExampleReceiptsSeeder.php @@ -68,5 +68,24 @@ class ExampleReceiptsSeeder extends Seeder 'flux_icon_name' => 'chat-bubble-bottom-center', ] ); + + Plugin::create( + [ + 'uuid' => '8d472959-400f-46ee-afb2-4a9f1cfd521f', + 'name' => 'This Day in History', + 'user_id' => '1', + 'data_payload' => null, + 'data_stale_minutes' => 720, + 'data_strategy' => 'polling', + 'polling_url' => 'https://raw.githubusercontent.com/jvivona/tidbyt-data/refs/heads/main/thisdayinhistwikipedia/thisdayinhist.json', + 'polling_verb' => 'get', + 'polling_header' => null, + 'render_markup' => null, + 'render_markup_view' => 'receipts.day-in-history', + 'detail_view_route' => null, + 'icon_url' => null, + 'flux_icon_name' => 'calendar', + ] + ); } } diff --git a/resources/views/receipts/day-in-history.liquid b/resources/views/receipts/day-in-history.liquid new file mode 100644 index 0000000..fda23b2 --- /dev/null +++ b/resources/views/receipts/day-in-history.liquid @@ -0,0 +1,79 @@ + + +
+ + + + + +