Fix typo and bug with permissions in SpaceController
MODIFY
app/Http/Controllers/SpaceController.php
app/Http/Controllers/SpaceController.php
@@ -4,16 +4,15 @@ namespace App\Http\Controllers;
use App\Space;
use Illuminate\Http\Request;
+use Illuminate\Support\Facades\Auth;
class SpaceController extends Controller {
public function __invoke($id) {
$space = Space::find($id);
- if ($space->users->contains(Auh::user()->id)) {
- return redirect()->route('dashboard');
- }
-
+ if ($space->users->contains(Auth::user()->id)) {
session(['space' => $space]);
+ }
return redirect()->route('dashboard');
}

Fix typo and bug with permissions in SpaceController