v1.5.19b bad back and frontend work
This commit is contained in:
@@ -23,7 +23,9 @@ class UserEventController extends Controller
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$userevents = UserEvent::join('events', 'events.id', '=', 'user_events.event_id')->orderBY('date' , 'asc')->where('user_id', auth()->user()->id)->get();
|
||||
$userevents = [];
|
||||
$userevents['events'] = UserEvent::join('events', 'events.id', '=', 'user_events.event_id')->get();
|
||||
$userevents['multiple'] = UserEvent::join('multiple_events', 'multiple_events.id', '=', 'user_events.multiple_event_id')->get();
|
||||
|
||||
return Response::detect("events.yourevents", [ "userevents" => $userevents ]);
|
||||
}
|
||||
@@ -154,7 +156,7 @@ class UserEventController extends Controller
|
||||
|
||||
// Check the UserEvent table if there is a row that has the user_id AND the event_id
|
||||
$getTableInfo = UserEvent::where('user_id', auth()->user()->id)
|
||||
->where('multiple_event_id', $request->multiple_events_id)->get();
|
||||
->where('multiple_event_id', $request->multiple_event_id)->get();
|
||||
|
||||
// If the row has both, then go back and show an error - Cause you're not allowed to be on the same event twice.
|
||||
if (count($getTableInfo) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user