Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added possibility of using HTTPS #69

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ APP_ENV=local
APP_KEY=
APP_DEBUG=false
APP_URL=http://127.0.0.1
ASSET_URL=https://your-domain.org/
APP_PORT=8080
APP_SERVICE=app
APP_TIMEZONE=UTC
Expand Down
4 changes: 4 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Search\Ingredient;
use CloudCreativity\LaravelJsonApi\LaravelJsonApi;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;

class AppServiceProvider extends ServiceProvider
{
Expand All @@ -25,6 +26,9 @@ public function register()
*/
public function boot()
{
if (strpos(env('APP_URL', ''), 'https') !== false) {
URL::forceScheme('https');
}
LaravelJsonApi::defaultApi('v1');

if (config('scout.driver') === 'algolia') {
Expand Down
4 changes: 2 additions & 2 deletions resources/views/foods/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<x-slot name="header">
<div class="flex justify-between items-center">
<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
</x-button-link.green>
</x-button-link.gray>
</div>
</x-slot>
<x-search-view :route="route('api:v1:foods.index')" :tags="$tags">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/goals/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<x-slot name="header">
<div class="flex justify-between items-center">
<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
</x-button-link.green>
</x-button-link.gray>
</div>
</x-slot>
<table class="w-full table-fixed">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<x-slot name="header">
<div class="flex justify-between items-center">
<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
</x-button-link.green>
</x-button-link.gray>
</div>
</x-slot>
<form method="POST" action="{{ route('journal-entries.store.from-nutrients') }}">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/journal-entries/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<x-slot name="header">
<div class="flex justify-between items-center">
<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
</x-button-link.green>
</x-button-link.gray>
</div>
</x-slot>
<form method="POST" action="{{ route('journal-entries.store') }}">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/journal-entries/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ class="border-0 shadow-none p-0 text-center"
</div>
</div>
</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
</x-button-link.green>
</x-button-link.gray>
</div>
</x-slot>
<div class="flex align-top flex-col space-y-4 sm:flex-row sm:space-x-4 sm:space-y-0">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/profiles/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<div class="flex justify-between items-center">
<h1 class="font-semibold text-2xl text-gray-800 leading-tight">{{ $title }}</h1>
@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
</x-button-link.green>
</x-button-link.gray>
@endcan
</div>
</x-slot>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/recipes/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<x-slot name="header">
<div class="flex justify-between items-center">
<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
</x-button-link.green>
</x-button-link.gray>
</div>
</x-slot>
<x-search-view :route="route('api:v1:recipes.index')" :tags="$tags">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/users/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<x-slot name="header">
<div class="flex justify-between items-center">
<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
</x-button-link.green>
</x-button-link.gray>
</div>
</x-slot>
<table class="min-w-max w-full table-auto">
Expand Down