fix: Order of workshopsIscribed on profile method
This commit is contained in:
@@ -167,7 +167,10 @@ class UserController extends Controller
|
|||||||
|
|
||||||
$workshopsInscribed = Workshop::select('id', 'title', 'image', 'date', 'time_start', 'time_end', 'status')->with('users:id')->where('status', 'pending')->whereHas('users', function ($query) use ($user) {
|
$workshopsInscribed = Workshop::select('id', 'title', 'image', 'date', 'time_start', 'time_end', 'status')->with('users:id')->where('status', 'pending')->whereHas('users', function ($query) use ($user) {
|
||||||
$query->where('users.id', $user->id);
|
$query->where('users.id', $user->id);
|
||||||
})->get();
|
})
|
||||||
|
->orderBy('date', 'asc')
|
||||||
|
->orderBy('time_start', 'asc')
|
||||||
|
->get();
|
||||||
|
|
||||||
$workshopsCount = Workshop::select('id')->where('status', 'pending')->count();
|
$workshopsCount = Workshop::select('id')->where('status', 'pending')->count();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user