diff --git a/src/Http/Controllers/BacklogController.php b/src/Http/Controllers/BacklogController.php index 09c91da..4b4dd5b 100644 --- a/src/Http/Controllers/BacklogController.php +++ b/src/Http/Controllers/BacklogController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|BacklogCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new BacklogCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new BacklogCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new BacklogResource($backlog))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new BacklogResource($backlog))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new BacklogResource($backlog))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/BoardController.php b/src/Http/Controllers/BoardController.php index 2b27899..be4a198 100644 --- a/src/Http/Controllers/BoardController.php +++ b/src/Http/Controllers/BoardController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|BoardCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new BoardCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new BoardCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new BoardResource($board))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new BoardResource($board))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new BoardResource($board))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/EpicController.php b/src/Http/Controllers/EpicController.php index a06f784..5156ea0 100644 --- a/src/Http/Controllers/EpicController.php +++ b/src/Http/Controllers/EpicController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|EpicCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new EpicCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new EpicCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new EpicResource($epic))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new EpicResource($epic))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new EpicResource($epic))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/FlowController.php b/src/Http/Controllers/FlowController.php index 8ba2942..a542a2a 100644 --- a/src/Http/Controllers/FlowController.php +++ b/src/Http/Controllers/FlowController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|FlowCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new FlowCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new FlowCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new FlowResource($flow))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new FlowResource($flow))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new FlowResource($flow))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/MilestoneController.php b/src/Http/Controllers/MilestoneController.php index be16abc..a0416b7 100644 --- a/src/Http/Controllers/MilestoneController.php +++ b/src/Http/Controllers/MilestoneController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|MilestoneCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new MilestoneCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new MilestoneCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new MilestoneResource($milestone))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new MilestoneResource($milestone))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new MilestoneResource($milestone))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/NoteController.php b/src/Http/Controllers/NoteController.php index 3de9dea..827a17b 100644 --- a/src/Http/Controllers/NoteController.php +++ b/src/Http/Controllers/NoteController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|NoteCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new NoteCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new NoteCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new NoteResource($note))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new NoteResource($note))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new NoteResource($note))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/ProjectController.php b/src/Http/Controllers/ProjectController.php index f156f34..55884d4 100644 --- a/src/Http/Controllers/ProjectController.php +++ b/src/Http/Controllers/ProjectController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|ProjectCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new ProjectCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new ProjectCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new ProjectResource($project))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new ProjectResource($project))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new ProjectResource($project))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/ReleaseController.php b/src/Http/Controllers/ReleaseController.php index aa91880..fe8b703 100644 --- a/src/Http/Controllers/ReleaseController.php +++ b/src/Http/Controllers/ReleaseController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|ReleaseCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new ReleaseCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new ReleaseCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new ReleaseResource($release))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new ReleaseResource($release))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new ReleaseResource($release))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/RoadmapController.php b/src/Http/Controllers/RoadmapController.php index f217b97..e382d05 100644 --- a/src/Http/Controllers/RoadmapController.php +++ b/src/Http/Controllers/RoadmapController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|RoadmapCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new RoadmapCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new RoadmapCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new RoadmapResource($roadmap))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new RoadmapResource($roadmap))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new RoadmapResource($roadmap))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/SourceController.php b/src/Http/Controllers/SourceController.php index 5f4210b..a0f9be3 100644 --- a/src/Http/Controllers/SourceController.php +++ b/src/Http/Controllers/SourceController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|SourceCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new SourceCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new SourceCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new SourceResource($source))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new SourceResource($source))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new SourceResource($source))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/SprintController.php b/src/Http/Controllers/SprintController.php index 1424877..0b99a07 100644 --- a/src/Http/Controllers/SprintController.php +++ b/src/Http/Controllers/SprintController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|SprintCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new SprintCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new SprintCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new SprintResource($sprint))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new SprintResource($sprint))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new SprintResource($sprint))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/TagController.php b/src/Http/Controllers/TagController.php index b7d1f64..7948086 100644 --- a/src/Http/Controllers/TagController.php +++ b/src/Http/Controllers/TagController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|TagCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new TagCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new TagCollection($paginator))->response($request); } $meta = [ @@ -341,7 +338,7 @@ public function show( ]; if ($request->expectsJson()) { - return new TagResource($tag); + return (new TagResource($tag))->response($request); } $meta['input'] = $request->input(); @@ -378,7 +375,7 @@ public function store( return (new TagResource($tag))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new TagResource($tag))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new TagResource($tag))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/TeamController.php b/src/Http/Controllers/TeamController.php index 2c4d886..28c14af 100644 --- a/src/Http/Controllers/TeamController.php +++ b/src/Http/Controllers/TeamController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|TeamCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new TeamCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new TeamCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new TeamResource($team))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new TeamResource($team))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new TeamResource($team))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/TicketController.php b/src/Http/Controllers/TicketController.php index 9f94675..3bd1288 100644 --- a/src/Http/Controllers/TicketController.php +++ b/src/Http/Controllers/TicketController.php @@ -223,7 +223,7 @@ public function lock( */ public function index( IndexRequest $request - ): JsonResponse|View { + ): JsonResponse|View|TicketCollection { $user = $request->user(); $validated = $request->validated(); @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new TicketCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new TicketCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new TicketResource($ticket))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new TicketResource($ticket))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new TicketResource($ticket))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/src/Http/Controllers/VersionController.php b/src/Http/Controllers/VersionController.php index 973032f..35c2bef 100644 --- a/src/Http/Controllers/VersionController.php +++ b/src/Http/Controllers/VersionController.php @@ -261,10 +261,7 @@ public function index( $paginator->appends($validated); if ($request->expectsJson()) { - return (new VersionCollection($paginator))->additional(['meta' => [ - 'session_user_id' => $user?->id, - 'validated' => $validated, - ]]); + return (new VersionCollection($paginator))->response($request); } $meta = [ @@ -378,7 +375,7 @@ public function store( return (new VersionResource($version))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -408,7 +405,7 @@ public function unlock( return (new VersionResource($version))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); @@ -436,7 +433,7 @@ public function update( return (new VersionResource($version))->response($request); } - $returnUrl = $validated['return_url'] ?? ''; + $returnUrl = $validated['_return_url'] ?? ''; if ($returnUrl) { return redirect($returnUrl); diff --git a/tests/Feature/Http/Controllers/BacklogRouteTest.php b/tests/Feature/Http/Controllers/BacklogRouteTest.php index 9737c1d..3a68829 100644 --- a/tests/Feature/Http/Controllers/BacklogRouteTest.php +++ b/tests/Feature/Http/Controllers/BacklogRouteTest.php @@ -17,7 +17,11 @@ class BacklogRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Backlog::class; diff --git a/tests/Feature/Http/Controllers/BoardRouteTest.php b/tests/Feature/Http/Controllers/BoardRouteTest.php index d38f2f5..92b423f 100644 --- a/tests/Feature/Http/Controllers/BoardRouteTest.php +++ b/tests/Feature/Http/Controllers/BoardRouteTest.php @@ -17,7 +17,11 @@ class BoardRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Board::class; diff --git a/tests/Feature/Http/Controllers/EpicRouteTest.php b/tests/Feature/Http/Controllers/EpicRouteTest.php index 68c004e..6f74172 100644 --- a/tests/Feature/Http/Controllers/EpicRouteTest.php +++ b/tests/Feature/Http/Controllers/EpicRouteTest.php @@ -17,7 +17,11 @@ class EpicRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Epic::class; diff --git a/tests/Feature/Http/Controllers/FlowRouteTest.php b/tests/Feature/Http/Controllers/FlowRouteTest.php index 7237765..71bbcaf 100644 --- a/tests/Feature/Http/Controllers/FlowRouteTest.php +++ b/tests/Feature/Http/Controllers/FlowRouteTest.php @@ -17,7 +17,11 @@ class FlowRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Flow::class; diff --git a/tests/Feature/Http/Controllers/MilestoneRouteTest.php b/tests/Feature/Http/Controllers/MilestoneRouteTest.php index be45c11..56f32e8 100644 --- a/tests/Feature/Http/Controllers/MilestoneRouteTest.php +++ b/tests/Feature/Http/Controllers/MilestoneRouteTest.php @@ -17,7 +17,11 @@ class MilestoneRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Milestone::class; diff --git a/tests/Feature/Http/Controllers/NoteRouteTest.php b/tests/Feature/Http/Controllers/NoteRouteTest.php index 2f4f958..70c2d5e 100644 --- a/tests/Feature/Http/Controllers/NoteRouteTest.php +++ b/tests/Feature/Http/Controllers/NoteRouteTest.php @@ -17,7 +17,11 @@ class NoteRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Note::class; diff --git a/tests/Feature/Http/Controllers/ProjectRouteTest.php b/tests/Feature/Http/Controllers/ProjectRouteTest.php index a9fd8aa..f47de09 100644 --- a/tests/Feature/Http/Controllers/ProjectRouteTest.php +++ b/tests/Feature/Http/Controllers/ProjectRouteTest.php @@ -17,7 +17,11 @@ class ProjectRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Project::class; diff --git a/tests/Feature/Http/Controllers/ReleaseRouteTest.php b/tests/Feature/Http/Controllers/ReleaseRouteTest.php index ab0500f..4cef32d 100644 --- a/tests/Feature/Http/Controllers/ReleaseRouteTest.php +++ b/tests/Feature/Http/Controllers/ReleaseRouteTest.php @@ -17,7 +17,11 @@ class ReleaseRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Release::class; diff --git a/tests/Feature/Http/Controllers/RoadmapRouteTest.php b/tests/Feature/Http/Controllers/RoadmapRouteTest.php index b3dec55..0bbeff6 100644 --- a/tests/Feature/Http/Controllers/RoadmapRouteTest.php +++ b/tests/Feature/Http/Controllers/RoadmapRouteTest.php @@ -17,7 +17,11 @@ class RoadmapRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Roadmap::class; diff --git a/tests/Feature/Http/Controllers/SourceRouteTest.php b/tests/Feature/Http/Controllers/SourceRouteTest.php index add5ada..fafe288 100644 --- a/tests/Feature/Http/Controllers/SourceRouteTest.php +++ b/tests/Feature/Http/Controllers/SourceRouteTest.php @@ -17,7 +17,11 @@ class SourceRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Source::class; diff --git a/tests/Feature/Http/Controllers/SprintRouteTest.php b/tests/Feature/Http/Controllers/SprintRouteTest.php index 03dcc32..99074cf 100644 --- a/tests/Feature/Http/Controllers/SprintRouteTest.php +++ b/tests/Feature/Http/Controllers/SprintRouteTest.php @@ -17,7 +17,11 @@ class SprintRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Sprint::class; diff --git a/tests/Feature/Http/Controllers/TagRouteTest.php b/tests/Feature/Http/Controllers/TagRouteTest.php index 7dddd89..d1b55b2 100644 --- a/tests/Feature/Http/Controllers/TagRouteTest.php +++ b/tests/Feature/Http/Controllers/TagRouteTest.php @@ -17,7 +17,11 @@ class TagRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Tag::class; diff --git a/tests/Feature/Http/Controllers/TeamRouteTest.php b/tests/Feature/Http/Controllers/TeamRouteTest.php index 2217224..d217050 100644 --- a/tests/Feature/Http/Controllers/TeamRouteTest.php +++ b/tests/Feature/Http/Controllers/TeamRouteTest.php @@ -17,7 +17,11 @@ class TeamRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Team::class; diff --git a/tests/Feature/Http/Controllers/TicketRouteTest.php b/tests/Feature/Http/Controllers/TicketRouteTest.php index d4f3d94..4e07ceb 100644 --- a/tests/Feature/Http/Controllers/TicketRouteTest.php +++ b/tests/Feature/Http/Controllers/TicketRouteTest.php @@ -17,7 +17,11 @@ class TicketRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Ticket::class; diff --git a/tests/Feature/Http/Controllers/VersionRouteTest.php b/tests/Feature/Http/Controllers/VersionRouteTest.php index 6b60963..8f7eb99 100644 --- a/tests/Feature/Http/Controllers/VersionRouteTest.php +++ b/tests/Feature/Http/Controllers/VersionRouteTest.php @@ -17,7 +17,11 @@ class VersionRouteTest extends TestCase use Resource\CreateTrait; use Resource\EditTrait; use Resource\DestroyTrait; + use Resource\IndexTrait; use Resource\LockTrait; + use Resource\RestoreTrait; + use Resource\ShowTrait; + use Resource\UnlockTrait; public string $fqdn = \GammaMatrix\Playground\Matrix\Models\Version::class; diff --git a/tests/Feature/TestCase.php b/tests/Feature/TestCase.php index caa8fa4..0687c10 100644 --- a/tests/Feature/TestCase.php +++ b/tests/Feature/TestCase.php @@ -8,6 +8,7 @@ use GammaMatrix\Playground\Test\OrchestraTestCase; use Tests\Unit\GammaMatrix\Playground\Matrix\Resource\TestTrait; +use Illuminate\Support\Carbon; /** * \Tests\Feature\GammaMatrix\Playground\Matrix\Resource\TestCase @@ -23,6 +24,9 @@ class TestCase extends OrchestraTestCase protected function setUp(): void { parent::setUp(); + + Carbon::setTestNow(Carbon::now()); + // dd([ // '__METHOD__' => __METHOD__, // 'path' => dirname(dirname(__DIR__)) . '/database/migrations',