3
0
Fork 0

Redesign + Fixes

This commit is contained in:
thomas 2021-06-29 22:05:00 +02:00
parent 7718ed6c32
commit 7fe8056e35
67 changed files with 1898 additions and 2799 deletions

View file

@ -29,14 +29,14 @@ class ShowController extends Controller
*/
public function index()
{
$shows = DB::select(DB::raw('SELECT t1.* FROM `shows` AS t1 RIGHT JOIN `show_dates` AS t2 ON t1.`id` = t2.`show_id` WHERE t2.`date` > CURDATE() GROUP BY t1.`id`'));
$shows = DB::select(DB::raw('SELECT t1.* FROM `shows` AS t1 RIGHT JOIN `show_dates` AS t2 ON t1.`id` = t2.`show_id` WHERE t2.`date` > CURRENT_TIMESTAMP() GROUP BY t1.`id`'));
return view('show')->with([
'shows' => $shows
]);
}
public function order($show_id) {
$show = Show::join('show_dates', 'show_dates.show_id', '=', 'shows.id')->select('shows.*')->where('shows.id', '=', $show_id)->firstOrFail();
$show = Show::join('show_dates', 'show_dates.show_id', '=', 'shows.id')->select('shows.*')->where('shows.id', '=', $show_id)->where('show_dates.date', '>', DB::raw('CURRENT_TIMESTAMP()'))->firstOrFail();
$dates = $show->getShowDates(Auth::user()->uuid);
return view('order')->with([