Attendize/app/Http/Controllers/OrganiserViewController.php

28 lines
661 B
PHP
Raw Normal View History

2016-03-05 00:18:10 +00:00
<?php
2016-02-29 15:59:36 +00:00
2016-03-05 00:18:10 +00:00
namespace App\Http\Controllers;
2016-02-29 15:59:36 +00:00
2016-03-05 00:18:10 +00:00
use App\Models\Organiser;
use View;
2016-02-29 15:59:36 +00:00
2016-03-05 00:18:10 +00:00
class OrganiserViewController extends Controller
{
public function showOrganiserHome($organiser_id, $slug = '', $preview = false)
{
2016-02-29 15:59:36 +00:00
$organiser = Organiser::findOrFail($organiser_id);
$data = [
2016-03-05 00:18:10 +00:00
'organiser' => $organiser,
'tickets' => $organiser->events()->orderBy('created_at', 'desc')->get(),
'is_embedded' => 0,
2016-02-29 15:59:36 +00:00
];
2016-03-05 00:18:10 +00:00
2016-02-29 15:59:36 +00:00
return View::make('Public.ViewOrganiser.OrganiserPage', $data);
}
2016-03-05 00:18:10 +00:00
public function showEventHomePreview($event_id)
{
return showEventHome($event_id, true);
2016-02-29 15:59:36 +00:00
}
}