Skip to content

Commit 4c67b04

Browse files
committed
Merge branch 'dev'
2 parents 8af4c4e + 65325f8 commit 4c67b04

File tree

12 files changed

+184
-7
lines changed

12 files changed

+184
-7
lines changed

.github/workflows/preflight.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ jobs:
108108
DB_PASSWORD: tailwind_components
109109
run: php artisan migrate:fresh --seed
110110

111-
- name: 🧪 Execute tests (Unit and Feature tests) via PHPUnit
111+
- name: 🧪 Execute tests (Unit and Feature tests) via Pest
112112
env:
113113
DB_CONNECTION: pgsql
114114
DB_DATABASE: tailwind_components
115115
DB_PORT: 5432
116116
DB_USERNAME: tailwind_components
117117
DB_HOST: 127.0.0.1
118118
DB_PASSWORD: tailwind_components
119-
run: vendor/bin/phpunit --testdox
119+
run: vendor/bin/pest --testdox

app/Traits/EnumToArray.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace App\Traits;
4+
5+
trait EnumToArray
6+
{
7+
8+
public static function names(): array
9+
{
10+
return array_column(self::cases(), 'name');
11+
}
12+
13+
public static function values(): array
14+
{
15+
return array_column(self::cases(), 'value');
16+
}
17+
18+
public static function array(): array
19+
{
20+
return array_combine(self::values(), self::names());
21+
}
22+
}

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"dedoc/scramble": "^0.12.22",
1717
"inertiajs/inertia-laravel": "^2.0",
1818
"laravel-ready/artisan-command-palette-ui": "^1.0",
19+
"laravel-ready/hasin": "^2.0",
1920
"laravel/framework": "^12.0",
2021
"laravel/tinker": "^2.10.1",
2122
"opcodesio/log-viewer": "^3.17",
@@ -61,7 +62,8 @@
6162
"post-create-project-cmd": [
6263
"@php artisan key:generate --ansi",
6364
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
64-
"@php artisan migrate --graceful --ansi"
65+
"@php artisan migrate --graceful --ansi",
66+
"pnpm i"
6567
],
6668
"dev": [
6769
"Composer\\Config::disableProcessTimeout",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@inertiajs/vue3": "^2.0.12",
2727
"@tailwindcss/vite": "^4.1.10",
2828
"@vitejs/plugin-vue": "^5.2.4",
29+
"@vue/server-renderer": "^3.5.16",
2930
"@vueuse/core": "^12.8.2",
3031
"class-variance-authority": "^0.7.1",
3132
"clsx": "^2.1.1",

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/views/app.blade.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232

3333
<title inertia>{{ config('app.name', 'Laravel') }}</title>
3434

35-
<link rel="icon" href="/favicon.ico" sizes="any">
36-
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
35+
<link rel="icon" href="https://fav.farm/👽" />
3736
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
3837

3938
<link rel="preconnect" href="https://fonts.bunny.net">
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
2+
<head>
3+
@include('web.layouts.partials.head')
4+
</head>
5+
6+
<body class="font-sans antialiased">
7+
@yield('content')
8+
</body>
9+
</html>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<meta charset="utf-8">
2+
<meta name="viewport" content="width=device-width, initial-scale=1">
3+
4+
{{-- Inline script to detect system dark mode preference and apply it immediately --}}
5+
<script>
6+
(function() {
7+
const appearance = '{{ $appearance ?? "system" }}';
8+
9+
if (appearance === 'system') {
10+
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
11+
12+
if (prefersDark) {
13+
document.documentElement.classList.add('dark');
14+
}
15+
}
16+
})();
17+
</script>
18+
19+
{{-- Inline style to set the HTML background color based on our theme in app.css --}}
20+
<style>
21+
html {
22+
background-color: oklch(1 0 0);
23+
}
24+
25+
html.dark {
26+
background-color: oklch(0.145 0 0);
27+
}
28+
</style>
29+
30+
<!-- CSRF Token -->
31+
<meta name="csrf-token" content="{{ csrf_token() }}">
32+
33+
<title>@yield('pageTitle', 'Laravel Ready: Next') | {{ config('app.name') }} </title>
34+
35+
<!-- Favicon -->
36+
<link rel="icon" href="https://fav.farm/👽" />
37+
38+
<!-- Fonts -->
39+
<link rel="preconnect" href="https://fonts.bunny.net">
40+
<link href="https://fonts.bunny.net/css?family=instrument-sans:400,500,600" rel="stylesheet" />
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<!-- Navbar -->
2+
<nav class="navbar">
3+
<!-- Nav Container -->
4+
<div class="nav-container">
5+
<!-- Logo Link -->
6+
<a class="logo-link" href="{{ url('/') }}">
7+
<!-- Site Name -->
8+
<span class="site-name">
9+
{{ config('app.name', 'Laravel Starter') }}
10+
</span>
11+
</a>
12+
13+
<!-- Hamburger Menu -->
14+
<button class="hamburger-menu" data-collapse-toggle="navbar-multi-level" type="button"
15+
aria-controls="navbar-multi-level" aria-expanded="false">
16+
<span>
17+
Open main menu
18+
</span>
19+
20+
<svg class="class-svg-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20"
21+
xmlns="http://www.w3.org/2000/svg">
22+
<path fill-rule="evenodd"
23+
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
24+
clip-rule="evenodd"></path>
25+
</svg>
26+
</button>
27+
28+
<!-- Auth Links -->
29+
<div class="auth-links" id="navbar-multi-level">
30+
<!-- Link List -->
31+
<ul class="link-list">
32+
@guest
33+
34+
<!-- Login -->
35+
<li class="login">
36+
<a href="{{ route('login') }}">
37+
{{ __('fortify-ui::auth.login') }}
38+
</a>
39+
</li>
40+
41+
<!-- Register -->
42+
<li class="register">
43+
<a href="{{ route('register') }}">
44+
{{ __('fortify-ui::auth.register') }}
45+
</a>
46+
</li>
47+
48+
@endguest
49+
50+
@auth
51+
<!-- Login -->
52+
<li class="login">
53+
<a onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
54+
{{ __('fortify-ui::auth.logout') }}
55+
56+
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
57+
@csrf
58+
</form>
59+
</a>
60+
</li>
61+
@endauth
62+
</ul>
63+
</div>
64+
</div>
65+
</nav>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@extends('web.layouts.layout')
2+
3+
@section('content')
4+
<section class="flex items-center justify-center min-h-screen py-24 mt-10 light:bg-white dark:bg-gray-900">
5+
<div class="container">
6+
<div class="row justify-content-center">
7+
<div class="col-md-8">
8+
<div class="card">
9+
<div class="card-header">{{ __('Dashboard') }}</div>
10+
11+
<div class="card-body">
12+
@if (session('status'))
13+
<div class="alert alert-success" role="alert">
14+
{{ session('status') }}
15+
</div>
16+
@endif
17+
18+
{{ __('You are logged in!') }}
19+
</div>
20+
</div>
21+
</div>
22+
</div>
23+
</div>
24+
</section>
25+
@endsection

0 commit comments

Comments
 (0)