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\Event;
|
2016-02-29 15:59:36 +00:00
|
|
|
|
2016-03-05 00:18:10 +00:00
|
|
|
class EventViewEmbeddedController extends Controller
|
|
|
|
|
{
|
2016-04-09 15:50:50 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Show an embedded version of the event page
|
|
|
|
|
*
|
|
|
|
|
* @param $event_id
|
|
|
|
|
* @return mixed
|
|
|
|
|
*/
|
2016-03-05 00:18:10 +00:00
|
|
|
public function showEmbeddedEvent($event_id)
|
|
|
|
|
{
|
2016-02-29 15:59:36 +00:00
|
|
|
$event = Event::findOrFail($event_id);
|
|
|
|
|
|
|
|
|
|
$data = [
|
2016-03-05 00:18:10 +00:00
|
|
|
'event' => $event,
|
|
|
|
|
'tickets' => $event->tickets()->orderBy('created_at', 'desc')->get(),
|
|
|
|
|
'is_embedded' => '1',
|
2016-02-29 15:59:36 +00:00
|
|
|
];
|
|
|
|
|
|
2016-04-09 15:50:50 +00:00
|
|
|
return view('Public.ViewEvent.Embedded.EventPage', $data);
|
2016-02-29 15:59:36 +00:00
|
|
|
}
|
|
|
|
|
}
|