mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-03-14 12:23:33 +00:00
This commit is contained in:
parent
9df538de16
commit
3abc67ff67
16 changed files with 89 additions and 34 deletions
5
.github/workflows/docker-build.yml
vendored
5
.github/workflows/docker-build.yml
vendored
|
|
@ -6,7 +6,6 @@ on:
|
|||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
|
|
@ -40,7 +39,9 @@ jobs:
|
|||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
images: |
|
||||
${{ env.REGISTRY }}/usetrmnl/byos_laravel
|
||||
${{ env.REGISTRY }}/usetrmnl/larapaper
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
########################
|
||||
FROM bnussbau/serversideup-php:8.4-fpm-nginx-alpine-imagick-chromium@sha256:ed705a4060d50143ddc538c1288afff217eaf76ad5791f7556a97943854cf745 AS base
|
||||
|
||||
LABEL org.opencontainers.image.source=https://github.com/usetrmnl/byos_laravel
|
||||
LABEL org.opencontainers.image.description="TRMNL BYOS Laravel"
|
||||
LABEL org.opencontainers.image.source=https://github.com/usetrmnl/larapaper
|
||||
LABEL org.opencontainers.image.description="LaraPaper"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
ARG APP_VERSION
|
||||
|
|
|
|||
22
README.md
22
README.md
|
|
@ -1,8 +1,8 @@
|
|||
## TRMNL BYOS (PHP/Laravel)
|
||||
## LaraPaper (PHP/Laravel)
|
||||
|
||||
[](https://github.com/usetrmnl/byos_laravel/actions/workflows/test.yml)
|
||||
[](https://github.com/usetrmnl/larapaper/actions/workflows/test.yml)
|
||||
|
||||
TRMNL BYOS Laravel is a self-hostable implementation of a TRMNL server, built with Laravel.
|
||||
LaraPaper is a self-hostable implementation of a TRMNL server (BYOS), built with Laravel.
|
||||
It allows you to manage TRMNL devices, generate screens using **native plugins** (Screens API, Markup), **recipes** (130+ from the [OSS community catalog](https://bnussbau.github.io/trmnl-recipe-catalog/), 700+ from the [TRMNL catalog](https://trmnl.com/recipes), or your own), or the **API**, and can also act as a **proxy** for the native cloud service (Core). With over 50k downloads and 200+ stars, it’s the most popular community-driven BYOS.
|
||||
|
||||

|
||||
|
|
@ -26,7 +26,7 @@ It allows you to manage TRMNL devices, generate screens using **native plugins**
|
|||
* Custom ESP32 with TRMNL firmware
|
||||
* E-Reader Devices
|
||||
* KOReader ([trmnl-koreader](https://github.com/usetrmnl/trmnl-koreader))
|
||||
* Kindle ([trmnl-kindle](https://github.com/usetrmnl/byos_laravel/pull/27))
|
||||
* Kindle ([trmnl-kindle](https://github.com/usetrmnl/larapaper/pull/27))
|
||||
* Nook ([trmnl-nook](https://github.com/usetrmnl/trmnl-nook))
|
||||
* Kobo ([trmnl-kobo](https://github.com/usetrmnl/trmnl-kobo))
|
||||
* Android Devices with [trmnl-android](https://github.com/usetrmnl/trmnl-android)
|
||||
|
|
@ -61,7 +61,7 @@ Docker Compose file located at: [docker/prod/docker-compose.yml](docker/prod/doc
|
|||
|
||||
##### Backup Database
|
||||
```sh
|
||||
docker ps #find container id of byos_laravel container
|
||||
docker ps #find container id of larapaper container
|
||||
docker cp {{CONTAINER_ID}}:/var/www/html/database/storage/database.sqlite database_backup.sqlite
|
||||
```
|
||||
|
||||
|
|
@ -73,11 +73,11 @@ docker compose up -d
|
|||
```
|
||||
|
||||
#### VPS
|
||||
If you’re using a VPS (e.g., Hetzner) and prefer an alternative to native Docker, you can install Dokploy and deploy BYOS Laravel using the integrated [Template](https://templates.dokploy.com/?q=trmnl+byos+laravel).
|
||||
If you’re using a VPS (e.g., Hetzner) and prefer an alternative to native Docker, you can install Dokploy and deploy LaraPaper using the integrated [Template](https://templates.dokploy.com/?q=trmnl+byos+laravel).
|
||||
It’s a quick way to get started without having to manually manage Docker setup.
|
||||
|
||||
#### PikaPods
|
||||
You can vote for TRMNL BYOS Laravel to be included as PikaPods Template here: [feedback.pikapods.com](https://feedback.pikapods.com/posts/842/add-app-trmnl-byos-laravel)
|
||||
You can vote for LaraPaper to be included as PikaPods Template here: [feedback.pikapods.com](https://feedback.pikapods.com/posts/842/add-app-trmnl-byos-laravel)
|
||||
|
||||
#### Umbrel
|
||||
Umbrel is supported through a community store, [see](http://github.com/bnussbau/umbrel-store).
|
||||
|
|
@ -173,13 +173,13 @@ See this YouTube guide: [https://www.youtube.com/watch?v=3xehPW-PCOM](https://ww
|
|||
### ☁️ Activate fresh TRMNL Device with Cloud Proxy
|
||||
|
||||
1) Setup the TRMNL as in the official docs with the cloud service (connect one of the plugins to later verify it works)
|
||||
2) Setup Laravel BYOS, create a user and login
|
||||
3) In Laravel BYOS in the header bar, activate the toggle "Permit Auto-Join"
|
||||
2) Setup LaraPaper, create a user and login
|
||||
3) In LaraPaper in the header bar, activate the toggle "Permit Auto-Join"
|
||||
4) Press and hold the button on the back of your TRMNL for 5 seconds to reactivate the captive portal (or reflash).
|
||||
5) Go through the setup process again, in the screen where you provide the Wi-Fi credentials there is also option to set the Server URL. Use the local address of your Laravel BYOS
|
||||
5) Go through the setup process again, in the screen where you provide the Wi-Fi credentials there is also option to set the Server URL. Use the local address of LaraPaper.
|
||||
6) The device should automatically appear in the device list; you can deactivate the "Permit Auto-Join" toggle again.
|
||||
7) In the devices list, activate the toggle "☁️ Proxy" for your device. (Make sure that the queue worker is active. In the docker image it should be running automatically.)
|
||||
8) As long as no Laravel BYOS plugin is scheduled, the device will show your cloud plugins.
|
||||
8) As long as no LaraPaper plugin is scheduled, the device will show your cloud plugins.
|
||||
|
||||
###### Troubleshooting
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ class Plugin extends Model
|
|||
if ($this->data_strategy !== 'polling' || ! $this->polling_url) {
|
||||
return;
|
||||
}
|
||||
$headers = ['User-Agent' => 'usetrmnl/byos_laravel', 'Accept' => 'application/json'];
|
||||
$headers = ['User-Agent' => 'usetrmnl/larapaper', 'Accept' => 'application/json'];
|
||||
|
||||
// resolve headers
|
||||
if ($this->polling_header) {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Laravel'),
|
||||
'name' => env('APP_NAME', 'LaraPaper'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
@ -127,6 +127,8 @@ return [
|
|||
'enabled' => env('REGISTRATION_ENABLED', true),
|
||||
],
|
||||
|
||||
'pixel_logo_enabled' => env('PIXELLOGO_ENABLED', true),
|
||||
|
||||
'force_https' => env('FORCE_HTTPS', false),
|
||||
'puppeteer_docker' => env('PUPPETEER_DOCKER', false),
|
||||
'puppeteer_mode' => env('PUPPETEER_MODE', 'local'),
|
||||
|
|
@ -154,5 +156,5 @@ return [
|
|||
|
||||
'catalog_url' => env('CATALOG_URL', 'https://raw.githubusercontent.com/bnussbau/trmnl-recipe-catalog/refs/heads/main/catalog.yaml'),
|
||||
|
||||
'github_repo' => env('GITHUB_REPO', 'usetrmnl/byos_laravel'),
|
||||
'github_repo' => env('GITHUB_REPO', 'usetrmnl/larapaper'),
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
app:
|
||||
image: ghcr.io/usetrmnl/byos_laravel:latest
|
||||
image: ghcr.io/usetrmnl/larapaper:latest
|
||||
ports:
|
||||
- "4567:8080"
|
||||
environment:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#### Clone the repository
|
||||
|
||||
```bash
|
||||
git clone git@github.com:usetrmnl/byos_laravel.git
|
||||
git clone git@github.com:usetrmnl/larapaper.git
|
||||
```
|
||||
|
||||
#### Copy environment file
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
<x-app-logo-icon class="size-5 fill-current text-white dark:text-black" />
|
||||
</div>
|
||||
<div class="ml-1 grid flex-1 text-left text-sm">
|
||||
{{-- <span class="mb-0.5 truncate leading-none font-semibold">TRMNL BYOS Laravel</span> --}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-7 pt-1.5 dark:fill-white" viewBox="0 0 1000 150"><path fill-rule="evenodd" d="M894.75 119.01V47.28h16.1V31.54h55.63v15.74h16.29v24.7h-23.43V56.43H918V119Zm-90.59 0v-15.55h-16.1V47.28h16.1V31.54h55.63v15.74h16.29v24.7h-23.42V56.43H811.3v6.22h32.39v25.07h-32.4v6.4h41.37V78.2h23.42v25.07h-16.29v15.74Zm-122.8 30.38V47.28h16.11V31.54h55.63v15.74h16.3v56.18h-16.38V119H704.6v30.4Zm23.25-55.26h41.36v-37.7H704.6ZM574.5 119v-15.55h-16.1V47.28h16.1V31.54h55.63v15.73h16.37v46.85h16.2v24.9h-23.42v-15.56h-9.15V119Zm7.13-24.89H623v-37.7h-41.36Zm-124.44 24.9V15.97h16.1V.25h55.64v15.73h16.29v56h-16.38v15.74h-48.4v31.3Zm23.24-56.37h41.36V25.32h-41.36ZM357.64 119v-15.55h-16.1V47.28h16.1V31.54h55.63v15.73h16.38v46.85h16.2v24.9h-23.43v-15.56h-9.15V119Zm7.14-24.89h41.36v-37.7h-41.36Zm-124.44 24.9V47.27h16.1V31.54h55.63v15.74h16.3v24.7h-23.43V56.43h-41.36V119Zm-106.87 0v-15.56h-16.1V47.28h16.1V31.54h55.63v15.73h16.37v46.85h16.2v24.9h-23.42v-15.56h-9.15V119Zm7.13-24.9h41.36v-37.7H140.6Zm-108.33 24.9v-15.56h-16.1V.25H39.4v93.88h41.36V78.39h23.43v25.07h-16.3V119Z"/></svg>
|
||||
@if(config('app.pixel_logo_enabled'))
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-7 pt-1.5 dark:fill-white" viewBox="0 0 1000 150"><path fill-rule="evenodd" d="M894.75 119.01V47.28h16.1V31.54h55.63v15.74h16.29v24.7h-23.43V56.43H918V119Zm-90.59 0v-15.55h-16.1V47.28h16.1V31.54h55.63v15.74h16.29v24.7h-23.42V56.43H811.3v6.22h32.39v25.07h-32.4v6.4h41.37V78.2h23.42v25.07h-16.29v15.74Zm-122.8 30.38V47.28h16.11V31.54h55.63v15.74h16.3v56.18h-16.38V119H704.6v30.4Zm23.25-55.26h41.36v-37.7H704.6ZM574.5 119v-15.55h-16.1V47.28h16.1V31.54h55.63v15.73h16.37v46.85h16.2v24.9h-23.42v-15.56h-9.15V119Zm7.13-24.89H623v-37.7h-41.36Zm-124.44 24.9V15.97h16.1V.25h55.64v15.73h16.29v56h-16.38v15.74h-48.4v31.3Zm23.24-56.37h41.36V25.32h-41.36ZM357.64 119v-15.55h-16.1V47.28h16.1V31.54h55.63v15.73h16.38v46.85h16.2v24.9h-23.43v-15.56h-9.15V119Zm7.14-24.89h41.36v-37.7h-41.36Zm-124.44 24.9V47.27h16.1V31.54h55.63v15.74h16.3v24.7h-23.43V56.43h-41.36V119Zm-106.87 0v-15.56h-16.1V47.28h16.1V31.54h55.63v15.73h16.37v46.85h16.2v24.9h-23.42v-15.56h-9.15V119Zm7.13-24.9h41.36v-37.7H140.6Zm-108.33 24.9v-15.56h-16.1V.25H39.4v93.88h41.36V78.39h23.43v25.07h-16.3V119Z"/></svg>
|
||||
@else
|
||||
<span class="mb-0.5 truncate leading-none font-semibold">LaraPaper</span>
|
||||
@endif
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
])
|
||||
|
||||
<div class="flex w-full flex-col text-center">
|
||||
{{-- <flux:heading size="xl">{{ $title }}</flux:heading>--}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 dark:fill-white" viewBox="0 0 1000 150"><path fill-rule="evenodd" d="M894.75 119.01V47.28h16.1V31.54h55.63v15.74h16.29v24.7h-23.43V56.43H918V119Zm-90.59 0v-15.55h-16.1V47.28h16.1V31.54h55.63v15.74h16.29v24.7h-23.42V56.43H811.3v6.22h32.39v25.07h-32.4v6.4h41.37V78.2h23.42v25.07h-16.29v15.74Zm-122.8 30.38V47.28h16.11V31.54h55.63v15.74h16.3v56.18h-16.38V119H704.6v30.4Zm23.25-55.26h41.36v-37.7H704.6ZM574.5 119v-15.55h-16.1V47.28h16.1V31.54h55.63v15.73h16.37v46.85h16.2v24.9h-23.42v-15.56h-9.15V119Zm7.13-24.89H623v-37.7h-41.36Zm-124.44 24.9V15.97h16.1V.25h55.64v15.73h16.29v56h-16.38v15.74h-48.4v31.3Zm23.24-56.37h41.36V25.32h-41.36ZM357.64 119v-15.55h-16.1V47.28h16.1V31.54h55.63v15.73h16.38v46.85h16.2v24.9h-23.43v-15.56h-9.15V119Zm7.14-24.89h41.36v-37.7h-41.36Zm-124.44 24.9V47.27h16.1V31.54h55.63v15.74h16.3v24.7h-23.43V56.43h-41.36V119Zm-106.87 0v-15.56h-16.1V47.28h16.1V31.54h55.63v15.73h16.37v46.85h16.2v24.9h-23.42v-15.56h-9.15V119Zm7.13-24.9h41.36v-37.7H140.6Zm-108.33 24.9v-15.56h-16.1V.25H39.4v93.88h41.36V78.39h23.43v25.07h-16.3V119Z"/></svg>
|
||||
@if(config('app.pixel_logo_enabled'))
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 dark:fill-white" viewBox="0 0 1000 150"><path fill-rule="evenodd" d="M894.75 119.01V47.28h16.1V31.54h55.63v15.74h16.29v24.7h-23.43V56.43H918V119Zm-90.59 0v-15.55h-16.1V47.28h16.1V31.54h55.63v15.74h16.29v24.7h-23.42V56.43H811.3v6.22h32.39v25.07h-32.4v6.4h41.37V78.2h23.42v25.07h-16.29v15.74Zm-122.8 30.38V47.28h16.11V31.54h55.63v15.74h16.3v56.18h-16.38V119H704.6v30.4Zm23.25-55.26h41.36v-37.7H704.6ZM574.5 119v-15.55h-16.1V47.28h16.1V31.54h55.63v15.73h16.37v46.85h16.2v24.9h-23.42v-15.56h-9.15V119Zm7.13-24.89H623v-37.7h-41.36Zm-124.44 24.9V15.97h16.1V.25h55.64v15.73h16.29v56h-16.38v15.74h-48.4v31.3Zm23.24-56.37h41.36V25.32h-41.36ZM357.64 119v-15.55h-16.1V47.28h16.1V31.54h55.63v15.73h16.38v46.85h16.2v24.9h-23.43v-15.56h-9.15V119Zm7.14-24.89h41.36v-37.7h-41.36Zm-124.44 24.9V47.27h16.1V31.54h55.63v15.74h16.3v24.7h-23.43V56.43h-41.36V119Zm-106.87 0v-15.56h-16.1V47.28h16.1V31.54h55.63v15.73h16.37v46.85h16.2v24.9h-23.42v-15.56h-9.15V119Zm7.13-24.9h41.36v-37.7H140.6Zm-108.33 24.9v-15.56h-16.1V.25H39.4v93.88h41.36V78.39h23.43v25.07h-16.3V119Z"/></svg>
|
||||
@else
|
||||
<flux:heading size="xl">LaraPaper</flux:heading>
|
||||
@endif
|
||||
<flux:subheading>{{ $description }}</flux:subheading>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@
|
|||
<x-trmnl::view>
|
||||
<x-trmnl::layout>
|
||||
<x-trmnl::richtext gapSize="large" align="center">
|
||||
<x-trmnl::title>Welcome to BYOS Laravel!</x-trmnl::title>
|
||||
<x-trmnl::title>Welcome to LaraPaper!</x-trmnl::title>
|
||||
<x-trmnl::content>Your device is connected.</x-trmnl::content>
|
||||
</x-trmnl::richtext>
|
||||
</x-trmnl::layout>
|
||||
<x-trmnl::title-bar title="byos_laravel"/>
|
||||
<x-trmnl::title-bar title="LaraPaper"/>
|
||||
</x-trmnl::view>
|
||||
</x-trmnl::screen>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,6 @@
|
|||
<x-trmnl::title>Sleep Mode</x-trmnl::title>
|
||||
</x-trmnl::richtext>
|
||||
</x-trmnl::layout>
|
||||
<x-trmnl::title-bar title="byos_laravel"/>
|
||||
<x-trmnl::title-bar title="LaraPaper"/>
|
||||
</x-trmnl::view>
|
||||
</x-trmnl::screen>
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ new class extends Component
|
|||
{{-- <li><flux:text><code>date: "%N"</code> is unsupported. Use <code>date: "u"</code> instead </flux:text></li>--}}
|
||||
{{-- </ul>--}}
|
||||
</ul>
|
||||
<flux:text class="mt-1">Please report <a href="https://github.com/usetrmnl/byos_laravel/issues/new" target="_blank" class="underline">issues on GitHub</a>. Include your example zip file.</flux:text></li>
|
||||
<flux:text class="mt-1">Please report <a href="https://github.com/usetrmnl/larapaper/issues/new" target="_blank" class="underline">issues on GitHub</a>. Include your example zip file.</flux:text></li>
|
||||
</div>
|
||||
|
||||
<form wire:submit="importZip">
|
||||
|
|
@ -315,7 +315,7 @@ new class extends Component
|
|||
<li><flux:text>API responses in formats other than <span class="font-mono">JSON</span> are not yet fully supported.</flux:text></li>
|
||||
<li><flux:text>There are limitations in payload size (Data Payload, Template).</flux:text></li>
|
||||
</ul>
|
||||
<flux:text class="mt-1">Please report issues, aside from the known limitations, on <a href="https://github.com/usetrmnl/byos_laravel/issues/new" target="_blank" class="underline">GitHub</a>. Include the recipe URL.</flux:text></li>
|
||||
<flux:text class="mt-1">Please report issues, aside from the known limitations, on <a href="https://github.com/usetrmnl/larapaper/issues/new" target="_blank" class="underline">GitHub</a>. Include the recipe URL.</flux:text></li>
|
||||
</flux:callout>
|
||||
</div>
|
||||
<livewire:catalog.trmnl />
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ new class extends Component
|
|||
<x-trmnl::view>
|
||||
<x-trmnl::layout>
|
||||
<x-trmnl::richtext gapSize="large" align="center">
|
||||
<x-trmnl::title>TRMNL BYOS Laravel</x-trmnl::title>
|
||||
<x-trmnl::content>“This screen was rendered by BYOS Laravel”</x-trmnl::content>
|
||||
<x-trmnl::title>LaraPaper</x-trmnl::title>
|
||||
<x-trmnl::content>“This screen was rendered by BYOS LaraPaper”</x-trmnl::content>
|
||||
<x-trmnl::label variant="underline">Benjamin Nussbaum</x-trmnl::label>
|
||||
</x-trmnl::richtext>
|
||||
</x-trmnl::layout>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>{{ $title ?? 'TRMNL BYOS Laravel' }}</title>
|
||||
<title>{{ $title ?? 'LaraPaper' }}</title>
|
||||
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=inter:400,500,600&display=swap" rel="stylesheet" />
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<x-layouts::auth.card>
|
||||
<div class="flex flex-col gap-6">
|
||||
<x-auth-header title="TRMNL BYOS Laravel" description="Server is up and running."/>
|
||||
<x-auth-header title="LaraPaper" description="Server is up and running."/>
|
||||
</div>
|
||||
<header class="w-full lg:max-w-4xl max-w-[335px] text-sm mt-6 not-has-[nav]:hidden">
|
||||
@if (Route::has('login'))
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
</header>
|
||||
@auth
|
||||
@if(config('app.version'))
|
||||
<flux:text class="text-xs">Version: <a href="https://github.com/usetrmnl/byos_laravel/releases/tag/{{ config('app.version') }}"
|
||||
<flux:text class="text-xs">Version: <a href="https://github.com/{{ config('app.github_repo') }}/releases/tag/{{ config('app.version') }}"
|
||||
target="_blank">{{ config('app.version') }}</a>
|
||||
</flux:text>
|
||||
@endif
|
||||
|
|
|
|||
46
tests/Feature/PixelLogoConfigTest.php
Normal file
46
tests/Feature/PixelLogoConfigTest.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
|
||||
uses(Illuminate\Foundation\Testing\RefreshDatabase::class);
|
||||
|
||||
test('auth pages show pixel logo SVG when pixel_logo_enabled is true', function (): void {
|
||||
Config::set('app.pixel_logo_enabled', true);
|
||||
|
||||
$response = $this->get('/login');
|
||||
|
||||
$response->assertStatus(200);
|
||||
$response->assertSee('viewBox="0 0 1000 150"', false);
|
||||
});
|
||||
|
||||
test('auth pages show heading instead of pixel logo when pixel_logo_enabled is false', function (): void {
|
||||
Config::set('app.pixel_logo_enabled', false);
|
||||
|
||||
$response = $this->get('/login');
|
||||
|
||||
$response->assertStatus(200);
|
||||
$response->assertDontSee('viewBox="0 0 1000 150"', false);
|
||||
$response->assertSee('LaraPaper');
|
||||
});
|
||||
|
||||
test('app logo shows text when pixel_logo_enabled is false', function (): void {
|
||||
Config::set('app.pixel_logo_enabled', false);
|
||||
|
||||
$user = User::factory()->create();
|
||||
$response = $this->actingAs($user)->get(route('dashboard'));
|
||||
|
||||
$response->assertStatus(200);
|
||||
$response->assertSee('LaraPaper');
|
||||
$response->assertDontSee('viewBox="0 0 1000 150"', false);
|
||||
});
|
||||
|
||||
test('app logo shows pixel logo SVG when pixel_logo_enabled is true', function (): void {
|
||||
Config::set('app.pixel_logo_enabled', true);
|
||||
|
||||
$user = User::factory()->create();
|
||||
$response = $this->actingAs($user)->get(route('dashboard'));
|
||||
|
||||
$response->assertStatus(200);
|
||||
$response->assertSee('viewBox="0 0 1000 150"', false);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue