Skip to content

Commit 97eb2e2

Browse files
author
Sebastian BURGIN-FIX (ext)
committed
wip
1 parent 6b31d57 commit 97eb2e2

60 files changed

Lines changed: 862 additions & 335 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/Http/Controllers/Ai/AiLlmIndexController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@
22

33
namespace App\Http\Controllers\Ai;
44

5+
use App\Actions\LlmUsageStatsAction;
56
use App\Actions\PageAction;
67
use App\Actions\ViewDataAction;
78
use App\Http\Controllers\Controller;
89
use Illuminate\View\View;
910

1011
class AiLlmIndexController extends Controller
1112
{
12-
public function __invoke(): View
13+
public function __invoke(LlmUsageStatsAction $stats): View
1314
{
1415
$viewData = new ViewDataAction;
1516

1617
return view('app.ai.llm.index')->with([
1718
'page' => (new PageAction(locale: null, routeName: 'ai.llm.index'))->default(),
1819
'groups' => $viewData->aiModelGroups(),
1920
'archive' => $viewData->aiModelArchive(),
21+
'llmSummary' => $stats->currentMonthSummary(),
2022
]);
2123
}
2224
}

app/Http/Controllers/Network/NetworkManageUpdateController.php

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use App\Models\NetworkUser;
1010
use Illuminate\Http\RedirectResponse;
1111
use Illuminate\Support\Facades\Mail;
12+
use Illuminate\Support\Facades\Storage;
1213
use Illuminate\Support\Facades\URL;
1314
use Illuminate\Support\Str;
1415
use Spatie\ResponseCache\Facades\ResponseCache;
@@ -18,13 +19,27 @@ class NetworkManageUpdateController extends Controller
1819
public function __invoke(NetworkManageUpdateRequest $request, NetworkUser $networkUser): RedirectResponse
1920
{
2021
// Hard whitelist: a signed link may only ever touch the person's own
21-
// contact channels, their own visibility and the company website.
22-
$networkUser->update([
22+
// contact channels, avatar, their own visibility and the company website.
23+
$attributes = [
2324
'email' => $request->validated('email'),
2425
'linkedin' => $request->validated('linkedin'),
2526
'phone' => $request->validated('phone'),
2627
'published' => $request->boolean('published'),
27-
]);
28+
];
29+
30+
if ($request->hasFile('avatar')) {
31+
// Raw upload goes to S3 as-is; codebar converts it to Cloudinary
32+
// later by replacing the avatar URL (the original stays in the bucket).
33+
$path = $request->file('avatar')->storePubliclyAs(
34+
'network/avatars',
35+
$networkUser->id.'-'.Str::random(8).'.'.$request->file('avatar')->extension(),
36+
's3',
37+
);
38+
39+
$attributes['avatar'] = Storage::disk('s3')->url($path);
40+
}
41+
42+
$networkUser->update($attributes);
2843

2944
Network::query()
3045
->where('key', $networkUser->network_key)

app/Http/Controllers/Services/ServicesIndexController.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,20 @@
55
use App\Actions\PageAction;
66
use App\Actions\ViewDataAction;
77
use App\Http\Controllers\Controller;
8-
use Illuminate\Http\RedirectResponse;
9-
use Illuminate\Support\Str;
108
use Illuminate\View\View;
119

1210
class ServicesIndexController extends Controller
1311
{
1412
/**
1513
* Display the user's profile form.
1614
*/
17-
public function __invoke(): View|RedirectResponse
15+
public function __invoke(): View
1816
{
19-
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');
17+
$locale = app()->getLocale();
2018

21-
/* $locale = app()->getLocale();
22-
23-
return view('app.services.index')->with([
24-
'page' => (new PageAction(locale: null, routeName: 'services.index'))->default(),
25-
'services' => (new ViewDataAction)->services($locale)->groupBy('group'),
26-
]);*/
19+
return view('app.services.index')->with([
20+
'page' => (new PageAction(locale: null, routeName: 'services.index'))->default(),
21+
'services' => (new ViewDataAction)->services($locale),
22+
]);
2723
}
2824
}

app/Http/Controllers/Services/ServicesShowController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __invoke(string $locale, Service $service): View|RedirectRespons
1919
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');
2020

2121
/* return view('app.services.show')->with([
22-
'page' => (new PageAction(locale: $locale, routeName: null))->service(service: $service),
22+
'page' => (new PageAction(locale: $locale, routeName: null))->service(service: $service, withReferences: true),
2323
'name' => $service->name,
2424
'teaser' => $service->teaser,
2525
'content' => Str::of($service->content ?? '')->markdown(),

app/Http/Requests/Network/NetworkManageUpdateRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public function rules(): array
2323
'phone' => ['nullable', 'string', 'max:50'],
2424
'website' => ['nullable', 'url', 'max:255'],
2525
'published' => ['nullable', 'boolean'],
26+
'avatar' => ['nullable', 'image', 'mimes:jpeg,png,webp', 'max:2048'],
2627
];
2728
}
2829
}

app/Support/PageNavigation.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
namespace App\Support;
4+
5+
class PageNavigation
6+
{
7+
/**
8+
* The main pages in visitor reading order.
9+
*
10+
* @return array<int, array{route: string, label: string, teaser: string}>
11+
*/
12+
public static function pages(): array
13+
{
14+
return [
15+
['route' => 'start.index', 'label' => __('Home'), 'teaser' => __('components.explore.home')],
16+
['route' => 'services.index', 'label' => __('Services'), 'teaser' => __('components.explore.services')],
17+
['route' => 'about-us.index', 'label' => __('Team'), 'teaser' => __('components.explore.team')],
18+
['route' => 'ai.index', 'label' => __('AI'), 'teaser' => __('components.explore.ai')],
19+
['route' => 'network.index', 'label' => __('Network'), 'teaser' => __('components.explore.network')],
20+
['route' => 'contact.index', 'label' => __('Contact'), 'teaser' => __('components.explore.contact')],
21+
];
22+
}
23+
24+
/**
25+
* @return array{route: string, label: string, teaser: string}|null
26+
*/
27+
public static function next(string $routeName): ?array
28+
{
29+
$pages = self::pages();
30+
31+
foreach ($pages as $index => $page) {
32+
if ($page['route'] === $routeName) {
33+
// No wrap-around: the last page (contact) shows no next card.
34+
return $pages[$index + 1] ?? null;
35+
}
36+
}
37+
38+
return null;
39+
}
40+
}

database/files/intro/codebar_intro_de.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

database/files/intro/codebar_intro_en.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

database/migrations/2025_06_23_225051_create_configurations_table.php

Lines changed: 0 additions & 43 deletions
This file was deleted.

database/migrations/2026_07_14_120000_add_detail_sections_to_products_table.php renamed to database/migrations/2026_07_14_120000_add_content_sections_to_products_table.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ public function up(): void
1313
{
1414
Schema::table('products', function (Blueprint $table) {
1515
$table->string('headline')->nullable()->after('name');
16-
$table->string('deployment_heading')->nullable()->after('content');
16+
17+
$table->string('features_heading')->nullable()->after('content');
18+
$table->text('features_intro')->nullable()->after('features_heading');
19+
$table->json('features')->nullable()->after('features_intro');
20+
21+
$table->string('deployment_heading')->nullable()->after('features');
1722
$table->text('deployment_intro')->nullable()->after('deployment_heading');
1823
$table->json('deployment_options')->nullable()->after('deployment_intro');
24+
1925
$table->string('cta_heading')->nullable()->after('deployment_options');
2026
$table->text('cta_body')->nullable()->after('cta_heading');
2127
});
@@ -29,6 +35,9 @@ public function down(): void
2935
Schema::table('products', function (Blueprint $table) {
3036
$table->dropColumn([
3137
'headline',
38+
'features_heading',
39+
'features_intro',
40+
'features',
3241
'deployment_heading',
3342
'deployment_intro',
3443
'deployment_options',

0 commit comments

Comments
 (0)