This commit is contained in:
marvin23 2024-05-16 21:36:09 +02:00 committed by GitHub
commit daeb46eae1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 21 additions and 16 deletions

View File

@ -7,6 +7,7 @@ APP_ENV=local
APP_KEY= APP_KEY=
APP_DEBUG=false APP_DEBUG=false
APP_URL=http://127.0.0.1 APP_URL=http://127.0.0.1
ASSET_URL=https://your-domain.org/
APP_PORT=8080 APP_PORT=8080
APP_SERVICE=app APP_SERVICE=app
APP_TIMEZONE=UTC APP_TIMEZONE=UTC

View File

@ -5,6 +5,7 @@ namespace App\Providers;
use App\Search\Ingredient; use App\Search\Ingredient;
use CloudCreativity\LaravelJsonApi\LaravelJsonApi; use CloudCreativity\LaravelJsonApi\LaravelJsonApi;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
class AppServiceProvider extends ServiceProvider class AppServiceProvider extends ServiceProvider
{ {
@ -25,6 +26,9 @@ class AppServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
if (strpos(env('APP_URL', ''), 'https') !== false) {
URL::forceScheme('https');
}
LaravelJsonApi::defaultApi('v1'); LaravelJsonApi::defaultApi('v1');
if (config('scout.driver') === 'algolia') { if (config('scout.driver') === 'algolia') {

View File

@ -3,9 +3,9 @@
<x-slot name="header"> <x-slot name="header">
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<h1 class="font-semibold text-2xl text-gray-800 leading-tight">Foods</h1> <h1 class="font-semibold text-2xl text-gray-800 leading-tight">Foods</h1>
<x-button-link.green href="{{ route('foods.create') }}" class="text-sm"> <x-button-link.gray href="{{ route('foods.create') }}" class="text-sm">
Add Food Add Food
</x-button-link.green> </x-button-link.gray>
</div> </div>
</x-slot> </x-slot>
<x-search-view :route="route('api:v1:foods.index')" :tags="$tags"> <x-search-view :route="route('api:v1:foods.index')" :tags="$tags">

View File

@ -3,9 +3,9 @@
<x-slot name="header"> <x-slot name="header">
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<h1 class="font-semibold text-2xl text-gray-800 leading-tight">My Goals</h1> <h1 class="font-semibold text-2xl text-gray-800 leading-tight">My Goals</h1>
<x-button-link.green href="{{ route('goals.create') }}" class="text-sm"> <x-button-link.gray href="{{ route('goals.create') }}" class="text-sm">
Add Goal Add Goal
</x-button-link.green> </x-button-link.gray>
</div> </div>
</x-slot> </x-slot>
<table class="w-full table-fixed"> <table class="w-full table-fixed">

View File

@ -3,9 +3,9 @@
<x-slot name="header"> <x-slot name="header">
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<h1 class="font-semibold text-xl text-gray-800 leading-tight">Add Entry</h1> <h1 class="font-semibold text-xl text-gray-800 leading-tight">Add Entry</h1>
<x-button-link.green href="{{ route('journal-entries.create', ['date' => $default_date->format('Y-m-d')]) }}" class="text-sm"> <x-button-link.gray href="{{ route('journal-entries.create', ['date' => $default_date->format('Y-m-d')]) }}" class="text-sm">
Add by Recipes/Foods Add by Recipes/Foods
</x-button-link.green> </x-button-link.gray>
</div> </div>
</x-slot> </x-slot>
<form method="POST" action="{{ route('journal-entries.store.from-nutrients') }}"> <form method="POST" action="{{ route('journal-entries.store.from-nutrients') }}">

View File

@ -3,9 +3,9 @@
<x-slot name="header"> <x-slot name="header">
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<h1 class="font-semibold text-xl text-gray-800 leading-tight">Add Entries</h1> <h1 class="font-semibold text-xl text-gray-800 leading-tight">Add Entries</h1>
<x-button-link.green href="{{ route('journal-entries.create.from-nutrients', ['date' => $default_date->format('Y-m-d')]) }}" class="text-sm"> <x-button-link.gray href="{{ route('journal-entries.create.from-nutrients', ['date' => $default_date->format('Y-m-d')]) }}" class="text-sm">
Add by Nutrients Add by Nutrients
</x-button-link.green> </x-button-link.gray>
</div> </div>
</x-slot> </x-slot>
<form method="POST" action="{{ route('journal-entries.store') }}"> <form method="POST" action="{{ route('journal-entries.store') }}">

View File

@ -33,9 +33,9 @@
</div> </div>
</div> </div>
</h1> </h1>
<x-button-link.green href="{{ route('journal-entries.create', ['date' => $date->format('Y-m-d')]) }}" class="text-sm"> <x-button-link.gray href="{{ route('journal-entries.create', ['date' => $date->format('Y-m-d')]) }}" class="text-sm">
Add Entry Add Entry
</x-button-link.green> </x-button-link.gray>
</div> </div>
</x-slot> </x-slot>
<div class="flex align-top flex-col space-y-4 sm:flex-row sm:space-x-4 sm:space-y-0"> <div class="flex align-top flex-col space-y-4 sm:flex-row sm:space-x-4 sm:space-y-0">

View File

@ -5,9 +5,9 @@
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<h1 class="font-semibold text-2xl text-gray-800 leading-tight">{{ $title }}</h1> <h1 class="font-semibold text-2xl text-gray-800 leading-tight">{{ $title }}</h1>
@can('editProfile', $user) @can('editProfile', $user)
<x-button-link.green href="{{ route('profiles.edit', $user) }}" class="text-sm"> <x-button-link.gray href="{{ route('profiles.edit', $user) }}" class="text-sm">
Edit Profile Edit Profile
</x-button-link.green> </x-button-link.gray>
@endcan @endcan
</div> </div>
</x-slot> </x-slot>

View File

@ -3,9 +3,9 @@
<x-slot name="header"> <x-slot name="header">
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<h1 class="font-semibold text-2xl text-gray-800 leading-tight">Recipes</h1> <h1 class="font-semibold text-2xl text-gray-800 leading-tight">Recipes</h1>
<x-button-link.green href="{{ route('recipes.create') }}" class="text-sm"> <x-button-link.gray href="{{ route('recipes.create') }}" class="text-sm">
Add Recipe Add Recipe
</x-button-link.green> </x-button-link.gray>
</div> </div>
</x-slot> </x-slot>
<x-search-view :route="route('api:v1:recipes.index')" :tags="$tags"> <x-search-view :route="route('api:v1:recipes.index')" :tags="$tags">

View File

@ -3,9 +3,9 @@
<x-slot name="header"> <x-slot name="header">
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<h1 class="font-semibold text-2xl text-gray-800 leading-tight">Users</h1> <h1 class="font-semibold text-2xl text-gray-800 leading-tight">Users</h1>
<x-button-link.green href="{{ route('users.create') }}"> <x-button-link.gray href="{{ route('users.create') }}">
Add User Add User
</x-button-link.green> </x-button-link.gray>
</div> </div>
</x-slot> </x-slot>
<table class="min-w-max w-full table-auto"> <table class="min-w-max w-full table-auto">