Separated laravel app to its own folder (#540)

This commit is contained in:
Julien Nahum
2024-08-26 18:24:56 +02:00
committed by GitHub
parent 39b8df5eed
commit 5bd1dda504
546 changed files with 124 additions and 143 deletions

21
api/app/helpers.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
if (!function_exists('front_url')) {
function front_url($path = '')
{
$baseUrl = config('app.front_url') ?? config('app.url');
\Log::info('Base URL for front-end: ' . $baseUrl);
if (! $baseUrl) {
return $path;
}
return rtrim($baseUrl, '/') . '/' . ltrim($path, '/');
}
}
if (!function_exists('pricing_enabled')) {
function pricing_enabled(): bool
{
return App::environment() !== 'testing' && !is_null(config('cashier.key'));
}
}