parent
0d0c182df8
commit
5862d05f35
|
|
@ -70,6 +70,15 @@ class SchoolController extends Controller
|
|||
'schools' => [$school->id],
|
||||
],
|
||||
]);
|
||||
|
||||
auth()->user()->addFlag('head_director'); // If user is creating a school, they are initially the head
|
||||
AuditLogEntry::create([
|
||||
'user' => auth()->user()->email,
|
||||
'ip_address' => request()->ip(),
|
||||
'message' => 'Marked '.auth()->user()->full_name().' as head director for '.$school->name,
|
||||
'affected' => ['schools' => [$school->id], 'users' => [auth()->user()->id]],
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
return redirect('/schools/'.$school->id);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
</x-card.heading>
|
||||
|
||||
|
||||
<x-form.form method="POST" action="/schools" class="!mt-4">
|
||||
<x-form.form method="POST" action="{{route('schools.store')}}" class="!mt-4">
|
||||
<x-form.body-grid columns="6" class="max-w-full">
|
||||
<x-form.field name="name" label_text="School Name" colspan="6"/>
|
||||
<x-form.field name="address" label_text="School Address" colspan="6"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue