Skip to content
Merged
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
13 changes: 9 additions & 4 deletions app/Http/Controllers/Jobs/JobsIndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@

use App\Actions\PageAction;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Str;
use Illuminate\View\View;

class JobsIndexController extends Controller
{
/**
* Display the user's profile form.
*/
public function __invoke(): View
public function __invoke(): View|RedirectResponse
{
return view('app.jobs.index')->with([
'page' => (new PageAction(locale: null, routeName: 'jobs.index'))->default(),
]);
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');

// @todo Notification
/* return view('app.jobs.index')->with([
'page' => (new PageAction(locale: null, routeName: 'jobs.index'))->default(),
]);*/
}
}
13 changes: 9 additions & 4 deletions app/Http/Controllers/Legal/PrivacyIndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@

use App\Actions\PageAction;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Str;
use Illuminate\View\View;

class PrivacyIndexController extends Controller
{
/**
* Display the user's profile form.
*/
public function __invoke(): View
public function __invoke(): View|RedirectResponse
{
return view('app.legal.privacy.index')->with([
'page' => (new PageAction(locale: null, routeName: 'legal.privacy.index'))->default(),
]);
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');

// @todo Notification
/* return view('app.legal.privacy.index')->with([
'page' => (new PageAction(locale: null, routeName: 'legal.privacy.index'))->default(),
]);*/
}
}
13 changes: 9 additions & 4 deletions app/Http/Controllers/Legal/TermsIndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@

use App\Actions\PageAction;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Str;
use Illuminate\View\View;

class TermsIndexController extends Controller
{
/**
* Display the user's profile form.
*/
public function __invoke(): View
public function __invoke(): View|RedirectResponse
{
return view('app.legal.terms.index')->with([
'page' => (new PageAction(locale: null, routeName: 'legal.terms.index'))->default(),
]);
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');

// @todo Notification
/* return view('app.legal.terms.index')->with([
'page' => (new PageAction(locale: null, routeName: 'legal.terms.index'))->default(),
]);*/
}
}
13 changes: 9 additions & 4 deletions app/Http/Controllers/Media/MediaIndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@

use App\Actions\PageAction;
use App\Http\Controllers\Controller;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Str;
use Illuminate\View\View;

class MediaIndexController extends Controller
{
/**
* Display the user's profile form.
*/
public function __invoke(): View
public function __invoke(): View|RedirectResponse
{
return view('app.media.index')->with([
'page' => (new PageAction(locale: null, routeName: 'media.index'))->default(),
]);
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');

// @todo Notification
/* return view('app.media.index')->with([
'page' => (new PageAction(locale: null, routeName: 'media.index'))->default(),
]);*/
}
}
26 changes: 26 additions & 0 deletions app/Http/Controllers/OpenSource/OpenSoruceShowController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace App\Http\Controllers\OpenSource;

use App\Actions\PageAction;
use App\Http\Controllers\Controller;
use App\Models\Product;
use Illuminate\Support\Str;
use Illuminate\View\View;

class OpenSoruceShowController extends Controller
{
/**
* Display the user's profile form.
*/
public function __invoke(string $locale, Product $product): View
{
return view('app.products.show')->with([
'page' => (new PageAction(locale: $locale))->product(product: $product),
'name' => $product->name,
'teaser' => $product->teaser,
'content' => Str::of($product->content)->markdown(),
'tags' => $product->tags,
]);
}
}
24 changes: 24 additions & 0 deletions app/Http/Controllers/OpenSource/OpenSourceIndexController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Http\Controllers\OpenSource;

use App\Actions\PageAction;
use App\Actions\ViewDataAction;
use App\Http\Controllers\Controller;
use Illuminate\View\View;

class OpenSourceIndexController extends Controller
{
/**
* Display the user's profile form.
*/
public function __invoke(): View
{
$locale = app()->getLocale();

return view('app.products.index')->with([
'page' => (new PageAction(locale: null, routeName: 'products.index'))->default(),
Comment on lines +19 to +20
Copy link

Copilot AI Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The open source controller is using the 'app.products.index' view; if this is not intended, consider updating it to render an open source-specific view.

Suggested change
return view('app.products.index')->with([
'page' => (new PageAction(locale: null, routeName: 'products.index'))->default(),
return view('app.open-source.index')->with([
'page' => (new PageAction(locale: null, routeName: 'open-source.index'))->default(),

Copilot uses AI. Check for mistakes.
'products' => (new ViewDataAction)->products($locale),
]);
}
}
3 changes: 3 additions & 0 deletions app/Http/Controllers/Sitemap/SitemapController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ class SitemapController extends Controller
'products.index',
'services.index',
'contact.index',
'legal.terms.index',
'legal.imprint.index',
'legal.privacy.index',
'jobs.index',
];

protected const array DEFAULT_LOCALES = [
Expand Down
24 changes: 24 additions & 0 deletions app/Http/Controllers/Technologies/TechnologiesIndexController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Http\Controllers\Technologies;

use App\Actions\PageAction;
use App\Actions\ViewDataAction;
use App\Http\Controllers\Controller;
use Illuminate\View\View;

class TechnologiesIndexController extends Controller
{
/**
* Display the user's profile form.
*/
public function __invoke(): View
{
$locale = app()->getLocale();

return view('app.products.index')->with([
'page' => (new PageAction(locale: null, routeName: 'products.index'))->default(),
Comment on lines +19 to +20
Copy link

Copilot AI Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The controller for technologies is rendering the 'app.products.index' view; if this is unintentional, please update it to a technology-specific view.

Suggested change
return view('app.products.index')->with([
'page' => (new PageAction(locale: null, routeName: 'products.index'))->default(),
return view('app.technologies.index')->with([
'page' => (new PageAction(locale: null, routeName: 'technologies.index'))->default(),

Copilot uses AI. Check for mistakes.
'products' => (new ViewDataAction)->products($locale),
]);
}
}
26 changes: 26 additions & 0 deletions app/Http/Controllers/Technologies/TechnologiesShowController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace App\Http\Controllers\Technologies;

use App\Actions\PageAction;
use App\Http\Controllers\Controller;
use App\Models\Product;
use Illuminate\Support\Str;
use Illuminate\View\View;

class TechnologiesShowController extends Controller
{
/**
* Display the user's profile form.
*/
public function __invoke(string $locale, Product $product): View
{
return view('app.products.show')->with([
'page' => (new PageAction(locale: $locale))->product(product: $product),
'name' => $product->name,
'teaser' => $product->teaser,
'content' => Str::of($product->content)->markdown(),
'tags' => $product->tags,
]);
}
}
10 changes: 5 additions & 5 deletions app/Models/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;

class Configuration extends Model
{
use HasFactory;
use HasTranslations;

public array $translatable = ['footer'];

protected $casts = [
'footer' => 'json',
'section_services' => 'boolean',
'section_products' => 'boolean',
'section_technologies' => 'boolean',
'section_open_source' => 'boolean',
'links' => 'json',
];
}
14 changes: 14 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

namespace App\Providers;

use App\Actions\ViewDataAction;
use App\Checks\FailedJobsCheck;
use App\Checks\FilesystemsDefaultCheck;
use App\Checks\JobsCheck;
use App\Models\Configuration;
use App\Models\News;
use App\Models\Product;
use App\Models\Service;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
use Spatie\Health\Checks\Checks\CacheCheck;
use Spatie\Health\Checks\Checks\DebugModeCheck;
Expand Down Expand Up @@ -41,6 +44,8 @@ public function boot(): void
FailedJobsCheck::new(),
SecurityAdvisoriesCheck::new()->lastDayOfMonth(),
]);

View::share('configuration', $this->getConfiguration());
}

private function multilanguage(): void
Expand All @@ -49,4 +54,13 @@ private function multilanguage(): void
Service::registerLocalizedBinding('service');
Product::registerLocalizedBinding('product');
}

private function getConfiguration(): ?Configuration
{
try {
return (new ViewDataAction)->configuration(app()->getLocale());
} catch (\Throwable) {
return null;
}
}
}
1 change: 0 additions & 1 deletion app/View/Components/AppLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public function render(): View
$locale = app()->getLocale();

return view('layouts.app')->with([
'configuration' => (new ViewDataAction)->configuration($locale),
'locales' => LocaleEnum::cases(),
'locale' => Str::slug($locale),
'page' => $this->page,
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"spatie/laravel-permission": "^6.7",
"spatie/laravel-responsecache": "^7.6",
"spatie/laravel-sitemap": "^7.3",
"spatie/laravel-translatable": "^6.11",
"spatie/security-advisories-health-check": "^1.2"
},
"require-dev": {
Expand Down
Loading