Skip to content

Commit bc3abb5

Browse files
authored
Merge pull request #24 from codebar-ag/main
main/production
2 parents 1cb0d61 + 226b796 commit bc3abb5

Some content is hidden

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

51 files changed

+727
-370
lines changed

app/Http/Controllers/Jobs/JobsIndexController.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@
44

55
use App\Actions\PageAction;
66
use App\Http\Controllers\Controller;
7+
use Illuminate\Http\RedirectResponse;
8+
use Illuminate\Support\Str;
79
use Illuminate\View\View;
810

911
class JobsIndexController extends Controller
1012
{
1113
/**
1214
* Display the user's profile form.
1315
*/
14-
public function __invoke(): View
16+
public function __invoke(): View|RedirectResponse
1517
{
16-
return view('app.jobs.index')->with([
17-
'page' => (new PageAction(locale: null, routeName: 'jobs.index'))->default(),
18-
]);
18+
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');
19+
20+
// @todo Notification
21+
/* return view('app.jobs.index')->with([
22+
'page' => (new PageAction(locale: null, routeName: 'jobs.index'))->default(),
23+
]);*/
1924
}
2025
}

app/Http/Controllers/Legal/PrivacyIndexController.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@
44

55
use App\Actions\PageAction;
66
use App\Http\Controllers\Controller;
7+
use Illuminate\Http\RedirectResponse;
8+
use Illuminate\Support\Str;
79
use Illuminate\View\View;
810

911
class PrivacyIndexController extends Controller
1012
{
1113
/**
1214
* Display the user's profile form.
1315
*/
14-
public function __invoke(): View
16+
public function __invoke(): View|RedirectResponse
1517
{
16-
return view('app.legal.privacy.index')->with([
17-
'page' => (new PageAction(locale: null, routeName: 'legal.privacy.index'))->default(),
18-
]);
18+
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');
19+
20+
// @todo Notification
21+
/* return view('app.legal.privacy.index')->with([
22+
'page' => (new PageAction(locale: null, routeName: 'legal.privacy.index'))->default(),
23+
]);*/
1924
}
2025
}

app/Http/Controllers/Legal/TermsIndexController.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@
44

55
use App\Actions\PageAction;
66
use App\Http\Controllers\Controller;
7+
use Illuminate\Http\RedirectResponse;
8+
use Illuminate\Support\Str;
79
use Illuminate\View\View;
810

911
class TermsIndexController extends Controller
1012
{
1113
/**
1214
* Display the user's profile form.
1315
*/
14-
public function __invoke(): View
16+
public function __invoke(): View|RedirectResponse
1517
{
16-
return view('app.legal.terms.index')->with([
17-
'page' => (new PageAction(locale: null, routeName: 'legal.terms.index'))->default(),
18-
]);
18+
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');
19+
20+
// @todo Notification
21+
/* return view('app.legal.terms.index')->with([
22+
'page' => (new PageAction(locale: null, routeName: 'legal.terms.index'))->default(),
23+
]);*/
1924
}
2025
}

app/Http/Controllers/Media/MediaIndexController.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@
44

55
use App\Actions\PageAction;
66
use App\Http\Controllers\Controller;
7+
use Illuminate\Http\RedirectResponse;
8+
use Illuminate\Support\Str;
79
use Illuminate\View\View;
810

911
class MediaIndexController extends Controller
1012
{
1113
/**
1214
* Display the user's profile form.
1315
*/
14-
public function __invoke(): View
16+
public function __invoke(): View|RedirectResponse
1517
{
16-
return view('app.media.index')->with([
17-
'page' => (new PageAction(locale: null, routeName: 'media.index'))->default(),
18-
]);
18+
return redirect()->route(Str::slug(app()->getLocale()).'.start.index');
19+
20+
// @todo Notification
21+
/* return view('app.media.index')->with([
22+
'page' => (new PageAction(locale: null, routeName: 'media.index'))->default(),
23+
]);*/
1924
}
2025
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\OpenSource;
4+
5+
use App\Actions\PageAction;
6+
use App\Http\Controllers\Controller;
7+
use App\Models\Product;
8+
use Illuminate\Support\Str;
9+
use Illuminate\View\View;
10+
11+
class OpenSoruceShowController extends Controller
12+
{
13+
/**
14+
* Display the user's profile form.
15+
*/
16+
public function __invoke(string $locale, Product $product): View
17+
{
18+
return view('app.products.show')->with([
19+
'page' => (new PageAction(locale: $locale))->product(product: $product),
20+
'name' => $product->name,
21+
'teaser' => $product->teaser,
22+
'content' => Str::of($product->content)->markdown(),
23+
'tags' => $product->tags,
24+
]);
25+
}
26+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\OpenSource;
4+
5+
use App\Actions\PageAction;
6+
use App\Actions\ViewDataAction;
7+
use App\Http\Controllers\Controller;
8+
use Illuminate\View\View;
9+
10+
class OpenSourceIndexController extends Controller
11+
{
12+
/**
13+
* Display the user's profile form.
14+
*/
15+
public function __invoke(): View
16+
{
17+
$locale = app()->getLocale();
18+
19+
return view('app.products.index')->with([
20+
'page' => (new PageAction(locale: null, routeName: 'products.index'))->default(),
21+
'products' => (new ViewDataAction)->products($locale),
22+
]);
23+
}
24+
}

app/Http/Controllers/Sitemap/SitemapController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ class SitemapController extends Controller
2323
'products.index',
2424
'services.index',
2525
'contact.index',
26+
'legal.terms.index',
2627
'legal.imprint.index',
28+
'legal.privacy.index',
29+
'jobs.index',
2730
];
2831

2932
protected const array DEFAULT_LOCALES = [
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\Technologies;
4+
5+
use App\Actions\PageAction;
6+
use App\Actions\ViewDataAction;
7+
use App\Http\Controllers\Controller;
8+
use Illuminate\View\View;
9+
10+
class TechnologiesIndexController extends Controller
11+
{
12+
/**
13+
* Display the user's profile form.
14+
*/
15+
public function __invoke(): View
16+
{
17+
$locale = app()->getLocale();
18+
19+
return view('app.products.index')->with([
20+
'page' => (new PageAction(locale: null, routeName: 'products.index'))->default(),
21+
'products' => (new ViewDataAction)->products($locale),
22+
]);
23+
}
24+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\Technologies;
4+
5+
use App\Actions\PageAction;
6+
use App\Http\Controllers\Controller;
7+
use App\Models\Product;
8+
use Illuminate\Support\Str;
9+
use Illuminate\View\View;
10+
11+
class TechnologiesShowController extends Controller
12+
{
13+
/**
14+
* Display the user's profile form.
15+
*/
16+
public function __invoke(string $locale, Product $product): View
17+
{
18+
return view('app.products.show')->with([
19+
'page' => (new PageAction(locale: $locale))->product(product: $product),
20+
'name' => $product->name,
21+
'teaser' => $product->teaser,
22+
'content' => Str::of($product->content)->markdown(),
23+
'tags' => $product->tags,
24+
]);
25+
}
26+
}

app/Models/Configuration.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
use Illuminate\Database\Eloquent\Factories\HasFactory;
66
use Illuminate\Database\Eloquent\Model;
7-
use Spatie\Translatable\HasTranslations;
87

98
class Configuration extends Model
109
{
1110
use HasFactory;
12-
use HasTranslations;
13-
14-
public array $translatable = ['footer'];
1511

1612
protected $casts = [
17-
'footer' => 'json',
13+
'section_services' => 'boolean',
14+
'section_products' => 'boolean',
15+
'section_technologies' => 'boolean',
16+
'section_open_source' => 'boolean',
17+
'links' => 'json',
1818
];
1919
}

0 commit comments

Comments
 (0)