Skip to content

Commit

Permalink
Merge pull request #32 from envor/main
Browse files Browse the repository at this point in the history
use team not team uuid to override default jetstream route
  • Loading branch information
inmanturbo authored Jun 25, 2024
2 parents 913ce24 + 0a0d8d3 commit f03cc1d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

All notable changes to `one-app` will be documented in this file.

## v1.0.24 - 2024-06-24

### What's Changed

* switchable team and domain middleware improvements by @inmanturbo in https://github.com/envor/one-app/pull/30
* uuid team navigation by @inmanturbo in https://github.com/envor/one-app/pull/31

**Full Changelog**: https://github.com/envor/one-app/compare/v1.0.23...v1.0.24

## v1.0.23 - 2024-06-21

### What's Changed
Expand Down
4 changes: 2 additions & 2 deletions stubs/navigation/app/Http/Controllers/TeamController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ class TeamController extends Controller
* @param int $teamId
* @return \Illuminate\View\View
*/
public function show(Request $request, $teamUUID)
public function show(Request $request, $team)
{
$team = Jetstream::newTeamModel()->where('uuid', $teamUUID)->firstOrFail();
$team = Jetstream::newTeamModel()->where('uuid', $team)->firstOrFail();

if (Gate::denies('view', $team)) {
abort(403);
Expand Down
2 changes: 1 addition & 1 deletion stubs/navigation/routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
return view('dashboard');
})->name('dashboard');

Route::get('/teams/{teamUUID}', [TeamController::class, 'show'])->name('teams.show');
Route::get('/teams/{team}', [TeamController::class, 'show'])->name('teams.show');
});

0 comments on commit f03cc1d

Please sign in to comment.