Feed in der Mitarbeiter-App (0.54.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 15m6s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 15m58s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 15m42s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 15m21s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 1h1m41s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 1h2m13s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 23m20s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 23m33s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 1m17s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m57s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 15m6s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 15m58s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 15m42s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 15m21s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 1h1m41s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 1h2m13s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 23m20s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 23m33s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 1m17s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m57s
Feed-Registry mit Anbietern (Neu im Team, Neuigkeiten, Termine, Umfragen), Schnellaktionen je nach Rechten, Nachladen über /feed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ab76b65aff
commit
8acc0cfd8b
152 changed files with 950 additions and 361 deletions
24
app/Http/Controllers/FeedController.php
Normal file
24
app/Http/Controllers/FeedController.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Feed\Feed;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Throwable;
|
||||
|
||||
class FeedController extends Controller
|
||||
{
|
||||
/** Weitere Einträge für „Mehr laden“: /feed?vor=<Zeitpunkt> */
|
||||
public function __invoke(Request $request, Feed $feed): JsonResponse
|
||||
{
|
||||
try {
|
||||
$before = $request->filled('vor') ? CarbonImmutable::parse((string) $request->query('vor')) : null;
|
||||
} catch (Throwable) {
|
||||
$before = null;
|
||||
}
|
||||
|
||||
return response()->json($feed->page($request->user(), $before));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue