v0.5.12a - Fixed store of event
This commit is contained in:
parent
376f37da8c
commit
d921803dfd
|
@ -62,7 +62,7 @@ class EventController extends Controller
|
||||||
$requestBody = $request->validate([
|
$requestBody = $request->validate([
|
||||||
"name" => "required|max:255",
|
"name" => "required|max:255",
|
||||||
"accountable" => "required|max:255",
|
"accountable" => "required|max:255",
|
||||||
"description" => "required|max:255",
|
"description" => "required",
|
||||||
"date" => "required"
|
"date" => "required"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ class EventController extends Controller
|
||||||
public function signups(Request $request)
|
public function signups(Request $request)
|
||||||
{
|
{
|
||||||
// Find every event you have clicked on. And find all users to that event, and the event name itself.
|
// Find every event you have clicked on. And find all users to that event, and the event name itself.
|
||||||
$events = UserEvent::join('users', 'users.id', '=', 'user_events.user_id')->join('events', 'events.id', '=', 'user_events.event_id')->where('event_id', $request->event)->get();
|
$events = UserEvent::join('users', 'users.id', '=', 'user_events.user_id')->join('events', 'events.id', '=', 'user_events.event_id')->where('event_id', $request->event_id)->get();
|
||||||
|
|
||||||
if (count($events) == 0)
|
if (count($events) == 0)
|
||||||
$events = Event::where('id', $request->event)->get();
|
$events = Event::where('id', $request->event)->get();
|
||||||
|
|
Loading…
Reference in New Issue