Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions app/Http/Controllers/Institution.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ class Institution extends Controller
{
public function view()
{
return view('institutions',
[
return view(
'institutions',
[
'all' => \App\Models\Institution::query()->orderByDesc('institutions.institution')->paginate(25),
]);
]
);
}

public function manage($joincode)
Expand Down Expand Up @@ -75,8 +77,7 @@ public function process($joincode, Request $request)
$user = \App\Models\User::all()->where('email', $email)->all();
$user->Institution()->associate($id);
$user->save();
}
else {
} else {
abort(404, 'User not found');
}
return view(route('institution.users', $joincode));
Expand All @@ -93,8 +94,7 @@ public function deletedelete($joincode)
{
$institution = \App\Models\Institution::query()->where('joincode', $joincode)->get('id');

foreach (\App\Models\User::query()->where('institution_id', $institution)->get('id') as $u)
{
foreach (\App\Models\User::query()->where('institution_id', $institution)->get('id') as $u) {
$u->Instituion->dissociate($u);
$u->save();
}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/institutionadduser.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg bg-white
</div>
</div>

</x-app-layout>
</x-app-layout>
2 changes: 1 addition & 1 deletion resources/views/institutionmanage.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg bg-white
</div>
</div>

</x-app-layout>
</x-app-layout>
2 changes: 1 addition & 1 deletion resources/views/institutionnew.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg bg-white
</div>
</div>
</div>
</x-app-layout>
</x-app-layout>
2 changes: 1 addition & 1 deletion resources/views/institutions.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg bg-white
</div>
</div>
</div>
</x-app-layout>
</x-app-layout>
2 changes: 1 addition & 1 deletion resources/views/institutionusers.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg bg-white
</div>
</nav>
</aside>
</x-app-layout>
</x-app-layout>
2 changes: 1 addition & 1 deletion resources/views/requestinstitutiondelete.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg bg-white
</div>
</div>
</div>
</x-app-layout>
</x-app-layout>