diff --git a/routes/matrix.php b/routes/matrix.php index 6c00e95..93b6d92 100644 --- a/routes/matrix.php +++ b/routes/matrix.php @@ -1,4 +1,7 @@ config('playground-matrix-resource.middleware.default'), 'namespace' => '\Playground\Matrix\Resource\Http\Controllers', ], function () { + Route::get('/', [ 'as' => 'playground.matrix.resource', 'uses' => 'IndexController@index', ])->can('view', Playground\Matrix\Models\Ticket::class); + }); diff --git a/src/Http/Controllers/BacklogController.php b/src/Http/Controllers/BacklogController.php index e5d2efa..867d5c1 100644 --- a/src/Http/Controllers/BacklogController.php +++ b/src/Http/Controllers/BacklogController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Backlog($backlog))->response($request); + return (new Resources\Backlog($backlog))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $backlog->restore(); if ($request->expectsJson()) { - return (new Resources\Backlog($backlog))->response($request); + return (new Resources\Backlog($backlog))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Backlog($backlog))->response($request); + return (new Resources\Backlog($backlog))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $backlog->save(); if ($request->expectsJson()) { - return (new Resources\Backlog($backlog))->response($request); + return (new Resources\Backlog($backlog))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $backlog->save(); if ($request->expectsJson()) { - return (new Resources\Backlog($backlog))->response($request); + return (new Resources\Backlog($backlog))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Backlog($backlog))->response($request); + return (new Resources\Backlog($backlog))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/BoardController.php b/src/Http/Controllers/BoardController.php index c0054a5..a53968e 100644 --- a/src/Http/Controllers/BoardController.php +++ b/src/Http/Controllers/BoardController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Board($board))->response($request); + return (new Resources\Board($board))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $board->restore(); if ($request->expectsJson()) { - return (new Resources\Board($board))->response($request); + return (new Resources\Board($board))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Board($board))->response($request); + return (new Resources\Board($board))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $board->save(); if ($request->expectsJson()) { - return (new Resources\Board($board))->response($request); + return (new Resources\Board($board))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $board->save(); if ($request->expectsJson()) { - return (new Resources\Board($board))->response($request); + return (new Resources\Board($board))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Board($board))->response($request); + return (new Resources\Board($board))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/EpicController.php b/src/Http/Controllers/EpicController.php index e80c1e0..92fe2dc 100644 --- a/src/Http/Controllers/EpicController.php +++ b/src/Http/Controllers/EpicController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Epic($epic))->response($request); + return (new Resources\Epic($epic))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $epic->restore(); if ($request->expectsJson()) { - return (new Resources\Epic($epic))->response($request); + return (new Resources\Epic($epic))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Epic($epic))->response($request); + return (new Resources\Epic($epic))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $epic->save(); if ($request->expectsJson()) { - return (new Resources\Epic($epic))->response($request); + return (new Resources\Epic($epic))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $epic->save(); if ($request->expectsJson()) { - return (new Resources\Epic($epic))->response($request); + return (new Resources\Epic($epic))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Epic($epic))->response($request); + return (new Resources\Epic($epic))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/FlowController.php b/src/Http/Controllers/FlowController.php index c19a764..53916d4 100644 --- a/src/Http/Controllers/FlowController.php +++ b/src/Http/Controllers/FlowController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Flow($flow))->response($request); + return (new Resources\Flow($flow))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $flow->restore(); if ($request->expectsJson()) { - return (new Resources\Flow($flow))->response($request); + return (new Resources\Flow($flow))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Flow($flow))->response($request); + return (new Resources\Flow($flow))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $flow->save(); if ($request->expectsJson()) { - return (new Resources\Flow($flow))->response($request); + return (new Resources\Flow($flow))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $flow->save(); if ($request->expectsJson()) { - return (new Resources\Flow($flow))->response($request); + return (new Resources\Flow($flow))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Flow($flow))->response($request); + return (new Resources\Flow($flow))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/MatrixController.php b/src/Http/Controllers/MatrixController.php index 33a308f..d923948 100644 --- a/src/Http/Controllers/MatrixController.php +++ b/src/Http/Controllers/MatrixController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Matrix($matrix))->response($request); + return (new Resources\Matrix($matrix))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $matrix->restore(); if ($request->expectsJson()) { - return (new Resources\Matrix($matrix))->response($request); + return (new Resources\Matrix($matrix))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Matrix($matrix))->response($request); + return (new Resources\Matrix($matrix))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $matrix->save(); if ($request->expectsJson()) { - return (new Resources\Matrix($matrix))->response($request); + return (new Resources\Matrix($matrix))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $matrix->save(); if ($request->expectsJson()) { - return (new Resources\Matrix($matrix))->response($request); + return (new Resources\Matrix($matrix))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Matrix($matrix))->response($request); + return (new Resources\Matrix($matrix))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/MilestoneController.php b/src/Http/Controllers/MilestoneController.php index df6e9d8..e58039f 100644 --- a/src/Http/Controllers/MilestoneController.php +++ b/src/Http/Controllers/MilestoneController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Milestone($milestone))->response($request); + return (new Resources\Milestone($milestone))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $milestone->restore(); if ($request->expectsJson()) { - return (new Resources\Milestone($milestone))->response($request); + return (new Resources\Milestone($milestone))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Milestone($milestone))->response($request); + return (new Resources\Milestone($milestone))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $milestone->save(); if ($request->expectsJson()) { - return (new Resources\Milestone($milestone))->response($request); + return (new Resources\Milestone($milestone))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $milestone->save(); if ($request->expectsJson()) { - return (new Resources\Milestone($milestone))->response($request); + return (new Resources\Milestone($milestone))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Milestone($milestone))->response($request); + return (new Resources\Milestone($milestone))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/NoteController.php b/src/Http/Controllers/NoteController.php index c05ead2..ae8d50e 100644 --- a/src/Http/Controllers/NoteController.php +++ b/src/Http/Controllers/NoteController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Note($note))->response($request); + return (new Resources\Note($note))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $note->restore(); if ($request->expectsJson()) { - return (new Resources\Note($note))->response($request); + return (new Resources\Note($note))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Note($note))->response($request); + return (new Resources\Note($note))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $note->save(); if ($request->expectsJson()) { - return (new Resources\Note($note))->response($request); + return (new Resources\Note($note))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $note->save(); if ($request->expectsJson()) { - return (new Resources\Note($note))->response($request); + return (new Resources\Note($note))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Note($note))->response($request); + return (new Resources\Note($note))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/ProjectController.php b/src/Http/Controllers/ProjectController.php index adda514..3a75bd0 100644 --- a/src/Http/Controllers/ProjectController.php +++ b/src/Http/Controllers/ProjectController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Project($project))->response($request); + return (new Resources\Project($project))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $project->restore(); if ($request->expectsJson()) { - return (new Resources\Project($project))->response($request); + return (new Resources\Project($project))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Project($project))->response($request); + return (new Resources\Project($project))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $project->save(); if ($request->expectsJson()) { - return (new Resources\Project($project))->response($request); + return (new Resources\Project($project))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $project->save(); if ($request->expectsJson()) { - return (new Resources\Project($project))->response($request); + return (new Resources\Project($project))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Project($project))->response($request); + return (new Resources\Project($project))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/ReleaseController.php b/src/Http/Controllers/ReleaseController.php index b0fb4fb..c424499 100644 --- a/src/Http/Controllers/ReleaseController.php +++ b/src/Http/Controllers/ReleaseController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Release($release))->response($request); + return (new Resources\Release($release))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $release->restore(); if ($request->expectsJson()) { - return (new Resources\Release($release))->response($request); + return (new Resources\Release($release))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Release($release))->response($request); + return (new Resources\Release($release))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $release->save(); if ($request->expectsJson()) { - return (new Resources\Release($release))->response($request); + return (new Resources\Release($release))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $release->save(); if ($request->expectsJson()) { - return (new Resources\Release($release))->response($request); + return (new Resources\Release($release))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Release($release))->response($request); + return (new Resources\Release($release))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/RoadmapController.php b/src/Http/Controllers/RoadmapController.php index 8eb309e..7f65d2f 100644 --- a/src/Http/Controllers/RoadmapController.php +++ b/src/Http/Controllers/RoadmapController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Roadmap($roadmap))->response($request); + return (new Resources\Roadmap($roadmap))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $roadmap->restore(); if ($request->expectsJson()) { - return (new Resources\Roadmap($roadmap))->response($request); + return (new Resources\Roadmap($roadmap))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Roadmap($roadmap))->response($request); + return (new Resources\Roadmap($roadmap))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $roadmap->save(); if ($request->expectsJson()) { - return (new Resources\Roadmap($roadmap))->response($request); + return (new Resources\Roadmap($roadmap))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $roadmap->save(); if ($request->expectsJson()) { - return (new Resources\Roadmap($roadmap))->response($request); + return (new Resources\Roadmap($roadmap))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Roadmap($roadmap))->response($request); + return (new Resources\Roadmap($roadmap))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/SourceController.php b/src/Http/Controllers/SourceController.php index 57a33c5..419d4c2 100644 --- a/src/Http/Controllers/SourceController.php +++ b/src/Http/Controllers/SourceController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Source($source))->response($request); + return (new Resources\Source($source))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $source->restore(); if ($request->expectsJson()) { - return (new Resources\Source($source))->response($request); + return (new Resources\Source($source))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Source($source))->response($request); + return (new Resources\Source($source))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $source->save(); if ($request->expectsJson()) { - return (new Resources\Source($source))->response($request); + return (new Resources\Source($source))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $source->save(); if ($request->expectsJson()) { - return (new Resources\Source($source))->response($request); + return (new Resources\Source($source))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Source($source))->response($request); + return (new Resources\Source($source))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/SprintController.php b/src/Http/Controllers/SprintController.php index 6f45cb3..a570b43 100644 --- a/src/Http/Controllers/SprintController.php +++ b/src/Http/Controllers/SprintController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Sprint($sprint))->response($request); + return (new Resources\Sprint($sprint))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $sprint->restore(); if ($request->expectsJson()) { - return (new Resources\Sprint($sprint))->response($request); + return (new Resources\Sprint($sprint))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Sprint($sprint))->response($request); + return (new Resources\Sprint($sprint))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $sprint->save(); if ($request->expectsJson()) { - return (new Resources\Sprint($sprint))->response($request); + return (new Resources\Sprint($sprint))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $sprint->save(); if ($request->expectsJson()) { - return (new Resources\Sprint($sprint))->response($request); + return (new Resources\Sprint($sprint))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Sprint($sprint))->response($request); + return (new Resources\Sprint($sprint))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/TagController.php b/src/Http/Controllers/TagController.php index 596a2d4..a7557de 100644 --- a/src/Http/Controllers/TagController.php +++ b/src/Http/Controllers/TagController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Tag($tag))->response($request); + return (new Resources\Tag($tag))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $tag->restore(); if ($request->expectsJson()) { - return (new Resources\Tag($tag))->response($request); + return (new Resources\Tag($tag))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Tag($tag))->response($request); + return (new Resources\Tag($tag))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $tag->save(); if ($request->expectsJson()) { - return (new Resources\Tag($tag))->response($request); + return (new Resources\Tag($tag))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $tag->save(); if ($request->expectsJson()) { - return (new Resources\Tag($tag))->response($request); + return (new Resources\Tag($tag))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Tag($tag))->response($request); + return (new Resources\Tag($tag))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/TeamController.php b/src/Http/Controllers/TeamController.php index 3c63329..ad0ad10 100644 --- a/src/Http/Controllers/TeamController.php +++ b/src/Http/Controllers/TeamController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Team($team))->response($request); + return (new Resources\Team($team))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $team->restore(); if ($request->expectsJson()) { - return (new Resources\Team($team))->response($request); + return (new Resources\Team($team))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Team($team))->response($request); + return (new Resources\Team($team))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $team->save(); if ($request->expectsJson()) { - return (new Resources\Team($team))->response($request); + return (new Resources\Team($team))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $team->save(); if ($request->expectsJson()) { - return (new Resources\Team($team))->response($request); + return (new Resources\Team($team))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Team($team))->response($request); + return (new Resources\Team($team))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/TicketController.php b/src/Http/Controllers/TicketController.php index 0b7da63..a3172c1 100644 --- a/src/Http/Controllers/TicketController.php +++ b/src/Http/Controllers/TicketController.php @@ -210,7 +210,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Ticket($ticket))->response($request); + return (new Resources\Ticket($ticket))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -318,7 +320,9 @@ public function restore( $ticket->restore(); if ($request->expectsJson()) { - return (new Resources\Ticket($ticket))->response($request); + return (new Resources\Ticket($ticket))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -356,7 +360,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Ticket($ticket))->response($request); + return (new Resources\Ticket($ticket))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -394,7 +400,9 @@ public function store( $ticket->save(); if ($request->expectsJson()) { - return (new Resources\Ticket($ticket))->response($request); + return (new Resources\Ticket($ticket))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -432,7 +440,9 @@ public function unlock( $ticket->save(); if ($request->expectsJson()) { - return (new Resources\Ticket($ticket))->response($request); + return (new Resources\Ticket($ticket))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -468,7 +478,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Ticket($ticket))->response($request); + return (new Resources\Ticket($ticket))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/src/Http/Controllers/VersionController.php b/src/Http/Controllers/VersionController.php index 20ccdae..5a95a60 100644 --- a/src/Http/Controllers/VersionController.php +++ b/src/Http/Controllers/VersionController.php @@ -207,7 +207,9 @@ public function lock( ]; if ($request->expectsJson()) { - return (new Resources\Version($version))->response($request); + return (new Resources\Version($version))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -315,7 +317,9 @@ public function restore( $version->restore(); if ($request->expectsJson()) { - return (new Resources\Version($version))->response($request); + return (new Resources\Version($version))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -353,7 +357,9 @@ public function show( ]; if ($request->expectsJson()) { - return (new Resources\Version($version))->response($request); + return (new Resources\Version($version))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $meta['input'] = $request->input(); @@ -389,7 +395,9 @@ public function store( $version->save(); if ($request->expectsJson()) { - return (new Resources\Version($version))->response($request); + return (new Resources\Version($version))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -427,7 +435,9 @@ public function unlock( $version->save(); if ($request->expectsJson()) { - return (new Resources\Version($version))->response($request); + return (new Resources\Version($version))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; @@ -463,7 +473,9 @@ public function update( } if ($request->expectsJson()) { - return (new Resources\Version($version))->response($request); + return (new Resources\Version($version))->additional(['meta' => [ + 'info' => $this->packageInfo, + ]])->response($request); } $returnUrl = $validated['_return_url'] ?? ''; diff --git a/tests/Unit/Policies/BoardPolicy/PolicyTest.php b/tests/Unit/Policies/BoardPolicy/PolicyTest.php new file mode 100644 index 0000000..9861588 --- /dev/null +++ b/tests/Unit/Policies/BoardPolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(BoardPolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/EpicPolicy/PolicyTest.php b/tests/Unit/Policies/EpicPolicy/PolicyTest.php new file mode 100644 index 0000000..da474e9 --- /dev/null +++ b/tests/Unit/Policies/EpicPolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(EpicPolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/FlowPolicy/PolicyTest.php b/tests/Unit/Policies/FlowPolicy/PolicyTest.php new file mode 100644 index 0000000..ef889e6 --- /dev/null +++ b/tests/Unit/Policies/FlowPolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(FlowPolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/MatrixPolicy/PolicyTest.php b/tests/Unit/Policies/MatrixPolicy/PolicyTest.php new file mode 100644 index 0000000..6c2a36d --- /dev/null +++ b/tests/Unit/Policies/MatrixPolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(MatrixPolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/MilestonePolicy/PolicyTest.php b/tests/Unit/Policies/MilestonePolicy/PolicyTest.php new file mode 100644 index 0000000..4f73b1a --- /dev/null +++ b/tests/Unit/Policies/MilestonePolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(MilestonePolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/NotePolicy/PolicyTest.php b/tests/Unit/Policies/NotePolicy/PolicyTest.php new file mode 100644 index 0000000..67a1147 --- /dev/null +++ b/tests/Unit/Policies/NotePolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(NotePolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/ProjectPolicy/PolicyTest.php b/tests/Unit/Policies/ProjectPolicy/PolicyTest.php new file mode 100644 index 0000000..46f1471 --- /dev/null +++ b/tests/Unit/Policies/ProjectPolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(ProjectPolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/ReleasePolicy/PolicyTest.php b/tests/Unit/Policies/ReleasePolicy/PolicyTest.php new file mode 100644 index 0000000..e048764 --- /dev/null +++ b/tests/Unit/Policies/ReleasePolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(ReleasePolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/RoadmapPolicy/PolicyTest.php b/tests/Unit/Policies/RoadmapPolicy/PolicyTest.php new file mode 100644 index 0000000..a5afeb1 --- /dev/null +++ b/tests/Unit/Policies/RoadmapPolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(RoadmapPolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/SourcePolicy/PolicyTest.php b/tests/Unit/Policies/SourcePolicy/PolicyTest.php new file mode 100644 index 0000000..58d431c --- /dev/null +++ b/tests/Unit/Policies/SourcePolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(SourcePolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/SprintPolicy/PolicyTest.php b/tests/Unit/Policies/SprintPolicy/PolicyTest.php new file mode 100644 index 0000000..35e2a52 --- /dev/null +++ b/tests/Unit/Policies/SprintPolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(SprintPolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/TagPolicy/PolicyTest.php b/tests/Unit/Policies/TagPolicy/PolicyTest.php new file mode 100644 index 0000000..79d11c4 --- /dev/null +++ b/tests/Unit/Policies/TagPolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(TagPolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/TeamPolicy/PolicyTest.php b/tests/Unit/Policies/TeamPolicy/PolicyTest.php new file mode 100644 index 0000000..9b2aab7 --- /dev/null +++ b/tests/Unit/Policies/TeamPolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(TeamPolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/TicketPolicy/PolicyTest.php b/tests/Unit/Policies/TicketPolicy/PolicyTest.php new file mode 100644 index 0000000..e359a62 --- /dev/null +++ b/tests/Unit/Policies/TicketPolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(TicketPolicy::class, $instance); + } +} diff --git a/tests/Unit/Policies/VersionPolicy/PolicyTest.php b/tests/Unit/Policies/VersionPolicy/PolicyTest.php new file mode 100644 index 0000000..929dc8a --- /dev/null +++ b/tests/Unit/Policies/VersionPolicy/PolicyTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(VersionPolicy::class, $instance); + } +}