Reformat code
This commit is contained in:
parent
6238e756f4
commit
9ec1cc20f2
|
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
||||||
|
|
@ -2,14 +2,14 @@
|
||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
use App\Models\Timezone;
|
|
||||||
use App\Models\Account;
|
use App\Models\Account;
|
||||||
|
use App\Models\Timezone;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use DB;
|
use DB;
|
||||||
|
use Hash;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Illuminate\Support\Facades\Artisan;
|
||||||
use PhpSpec\Exception\Exception;
|
use PhpSpec\Exception\Exception;
|
||||||
use Hash;
|
|
||||||
|
|
||||||
class Install extends Command
|
class Install extends Command
|
||||||
{
|
{
|
||||||
|
|
@ -45,7 +45,7 @@ class Install extends Command
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->comment('--------------------');
|
$this->comment('--------------------');
|
||||||
$this->comment('Attempting to install Attendize v'.$version);
|
$this->comment('Attempting to install Attendize v' . $version);
|
||||||
$this->comment('--------------------');
|
$this->comment('--------------------');
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -71,7 +71,7 @@ class Install extends Command
|
||||||
/*
|
/*
|
||||||
* If there is no account prompt the user to create one;
|
* If there is no account prompt the user to create one;
|
||||||
*/
|
*/
|
||||||
if(Account::count() === 0) {
|
if (Account::count() === 0) {
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
try {
|
try {
|
||||||
$this->comment('--------------------');
|
$this->comment('--------------------');
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,8 @@
|
||||||
|
|
||||||
namespace App\Events;
|
namespace App\Events;
|
||||||
|
|
||||||
use App\Events\Event;
|
|
||||||
use App\Models\Order;
|
use App\Models\Order;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
|
||||||
|
|
||||||
class OrderCompletedEvent extends Event
|
class OrderCompletedEvent extends Event
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,11 @@
|
||||||
namespace App\Exceptions;
|
namespace App\Exceptions;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Validation\ValidationException;
|
|
||||||
use Illuminate\Auth\Access\AuthorizationException;
|
use Illuminate\Auth\Access\AuthorizationException;
|
||||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
|
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||||
|
|
||||||
//use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler;
|
//use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler;
|
||||||
|
|
||||||
|
|
@ -30,7 +30,7 @@ class Handler extends ExceptionHandler
|
||||||
*
|
*
|
||||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||||
*
|
*
|
||||||
* @param \Exception $e
|
* @param \Exception $e
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function report(Exception $e)
|
public function report(Exception $e)
|
||||||
|
|
@ -41,8 +41,8 @@ class Handler extends ExceptionHandler
|
||||||
/**
|
/**
|
||||||
* Render an exception into an HTTP response.
|
* Render an exception into an HTTP response.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Exception $e
|
* @param \Exception $e
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function render($request, Exception $e)
|
public function render($request, Exception $e)
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class QueueHandler
|
||||||
'attendees' => $order->attendees,
|
'attendees' => $order->attendees,
|
||||||
];
|
];
|
||||||
|
|
||||||
$pdf_file = storage_path().'/'.$order->order_reference;
|
$pdf_file = storage_path() . '/' . $order->order_reference;
|
||||||
exit($pdf_file);
|
exit($pdf_file);
|
||||||
|
|
||||||
PDF::setOutputMode('F'); // force to file
|
PDF::setOutputMode('F'); // force to file
|
||||||
|
|
@ -61,7 +61,8 @@ class QueueHandler
|
||||||
$message_object = Message::find($data['message_id']);
|
$message_object = Message::find($data['message_id']);
|
||||||
$event = $message_object->event;
|
$event = $message_object->event;
|
||||||
|
|
||||||
$attendees = ($message_object->recipients == 0) ? $event->attendees : Attendee::where('ticket_id', '=', $message_object->recipients)->where('account_id', '=', $message_object->account_id)->get();
|
$attendees = ($message_object->recipients == 0) ? $event->attendees : Attendee::where('ticket_id', '=',
|
||||||
|
$message_object->recipients)->where('account_id', '=', $message_object->account_id)->get();
|
||||||
|
|
||||||
$toFields = [];
|
$toFields = [];
|
||||||
foreach ($attendees as $attendee) {
|
foreach ($attendees as $attendee) {
|
||||||
|
|
@ -76,9 +77,9 @@ class QueueHandler
|
||||||
|
|
||||||
Mail::send('Emails.messageAttendees', $data, function ($message) use ($toFields, $event, $message_object) {
|
Mail::send('Emails.messageAttendees', $data, function ($message) use ($toFields, $event, $message_object) {
|
||||||
$message->to($toFields)
|
$message->to($toFields)
|
||||||
->from(config('attendize.outgoing_email_noreply'), $event->organiser->name)
|
->from(config('attendize.outgoing_email_noreply'), $event->organiser->name)
|
||||||
->replyTo($event->organiser->email, $event->organiser->name)
|
->replyTo($event->organiser->email, $event->organiser->name)
|
||||||
->subject($message_object->subject);
|
->subject($message_object->subject);
|
||||||
});
|
});
|
||||||
|
|
||||||
$message_object->is_sent = 1;
|
$message_object->is_sent = 1;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(!function_exists('money')) {
|
if (!function_exists('money')) {
|
||||||
/**
|
/**
|
||||||
* Format a given amount to the given currency
|
* Format a given amount to the given currency
|
||||||
*
|
*
|
||||||
|
|
@ -10,7 +10,8 @@ if(!function_exists('money')) {
|
||||||
*/
|
*/
|
||||||
function money($amount, \App\Models\Currency $currency)
|
function money($amount, \App\Models\Currency $currency)
|
||||||
{
|
{
|
||||||
return $currency->symbol_left . number_format($amount, $currency->decimal_place, $currency->decimal_point, $currency->thousand_point) . $currency->symbol_right;
|
return $currency->symbol_left . number_format($amount, $currency->decimal_place, $currency->decimal_point,
|
||||||
|
$currency->thousand_point) . $currency->symbol_right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@ Form::macro('labelWithHelp', function ($name, $value, $options, $help_text) {
|
||||||
$label = Form::label($name, '%s', $options);
|
$label = Form::label($name, '%s', $options);
|
||||||
|
|
||||||
return sprintf($label, $value)
|
return sprintf($label, $value)
|
||||||
.'<a style="margin-left: 4px;font-size: 11px;" href="javascript:showHelp('."'".$help_text."'".');" >'
|
. '<a style="margin-left: 4px;font-size: 11px;" href="javascript:showHelp(' . "'" . $help_text . "'" . ');" >'
|
||||||
.'<i class="ico ico-question "></i>'
|
. '<i class="ico ico-question "></i>'
|
||||||
.'</a>';
|
. '</a>';
|
||||||
});
|
});
|
||||||
|
|
||||||
Form::macro('customCheckbox', function ($name, $value, $checked = false, $label = false, $options = []) {
|
Form::macro('customCheckbox', function ($name, $value, $checked = false, $label = false, $options = []) {
|
||||||
|
|
@ -38,11 +38,11 @@ Form::macro('customCheckbox', function ($name, $value, $checked = false, $label
|
||||||
});
|
});
|
||||||
|
|
||||||
Form::macro('styledFile', function ($name, $multiple = false) {
|
Form::macro('styledFile', function ($name, $multiple = false) {
|
||||||
$out = '<div class="styledFile" id="input-'.$name.'">
|
$out = '<div class="styledFile" id="input-' . $name . '">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<span class="btn btn-primary btn-file ">
|
<span class="btn btn-primary btn-file ">
|
||||||
Browse… <input name="'.$name.'" type="file" '.($multiple ? 'multiple' : '').'>
|
Browse… <input name="' . $name . '" type="file" ' . ($multiple ? 'multiple' : '') . '>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<input type="text" class="form-control" readonly>
|
<input type="text" class="form-control" readonly>
|
||||||
|
|
@ -57,25 +57,26 @@ Form::macro('styledFile', function ($name, $multiple = false) {
|
||||||
return $out;
|
return $out;
|
||||||
});
|
});
|
||||||
|
|
||||||
HTML::macro('sortable_link', function ($title, $active_sort, $sort_by, $sort_order, $url_params = [], $class = '', $extra = '') {
|
HTML::macro('sortable_link',
|
||||||
|
function ($title, $active_sort, $sort_by, $sort_order, $url_params = [], $class = '', $extra = '') {
|
||||||
|
|
||||||
$sort_order = $sort_order == 'asc' ? 'desc' : 'asc';
|
$sort_order = $sort_order == 'asc' ? 'desc' : 'asc';
|
||||||
|
|
||||||
$url_params = http_build_query([
|
$url_params = http_build_query([
|
||||||
'sort_by' => $sort_by,
|
'sort_by' => $sort_by,
|
||||||
'sort_order' => $sort_order,
|
'sort_order' => $sort_order,
|
||||||
] + $url_params);
|
] + $url_params);
|
||||||
|
|
||||||
$html = "<a href='?$url_params' class='col-sort $class' $extra>";
|
$html = "<a href='?$url_params' class='col-sort $class' $extra>";
|
||||||
|
|
||||||
$html .= ($active_sort == $sort_by) ? "<b>$title</b>" : $title;
|
$html .= ($active_sort == $sort_by) ? "<b>$title</b>" : $title;
|
||||||
|
|
||||||
$html .= ($sort_order == 'desc') ? '<i class="ico-arrow-down22"></i>' : '<i class="ico-arrow-up22"></i>';
|
$html .= ($sort_order == 'desc') ? '<i class="ico-arrow-down22"></i>' : '<i class="ico-arrow-up22"></i>';
|
||||||
|
|
||||||
$html .= '</a>';
|
$html .= '</a>';
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
});
|
});
|
||||||
|
|
||||||
Blade::directive('money', function ($expression) {
|
Blade::directive('money', function ($expression) {
|
||||||
return "<?php echo number_format($expression, 2); ?>";
|
return "<?php echo number_format($expression, 2); ?>";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ namespace app\Http\Controllers\API;
|
||||||
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\Request;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class ApiBaseController extends Controller
|
class ApiBaseController extends Controller
|
||||||
|
|
@ -15,6 +14,6 @@ class ApiBaseController extends Controller
|
||||||
{
|
{
|
||||||
$this->account_id = Auth::guard('api')->user()->account_id;
|
$this->account_id = Auth::guard('api')->user()->account_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -25,16 +25,24 @@ class AttendeesApiController extends ApiBaseController
|
||||||
*/
|
*/
|
||||||
public function show(Request $request, $attendee_id)
|
public function show(Request $request, $attendee_id)
|
||||||
{
|
{
|
||||||
if($attendee_id) {
|
if ($attendee_id) {
|
||||||
return Attendee::scope($this->account_id)->find($attendee_id);
|
return Attendee::scope($this->account_id)->find($attendee_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response('Attendee Not Found', 404);
|
return response('Attendee Not Found', 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(Request $request) {}
|
public function store(Request $request)
|
||||||
public function update(Request $request) {}
|
{
|
||||||
public function destroy(Request $request) {}
|
}
|
||||||
|
|
||||||
|
public function update(Request $request)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy(Request $request)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -24,16 +24,24 @@ class EventsApiController extends ApiBaseController
|
||||||
*/
|
*/
|
||||||
public function show(Request $request, $attendee_id)
|
public function show(Request $request, $attendee_id)
|
||||||
{
|
{
|
||||||
if($attendee_id) {
|
if ($attendee_id) {
|
||||||
return Event::scope($this->account_id)->find($attendee_id);
|
return Event::scope($this->account_id)->find($attendee_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response('Event Not Found', 404);
|
return response('Event Not Found', 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(Request $request) {}
|
public function store(Request $request)
|
||||||
public function update(Request $request) {}
|
{
|
||||||
public function destroy(Request $request) {}
|
}
|
||||||
|
|
||||||
|
public function update(Request $request)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy(Request $request)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -25,7 +25,7 @@ class AuthController extends Controller
|
||||||
/**
|
/**
|
||||||
* Create a new authentication controller instance.
|
* Create a new authentication controller instance.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Contracts\Auth\Guard $auth
|
* @param \Illuminate\Contracts\Auth\Guard $auth
|
||||||
* @param \Illuminate\Contracts\Auth\Registrar $registrar
|
* @param \Illuminate\Contracts\Auth\Registrar $registrar
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ class PasswordController extends Controller
|
||||||
/**
|
/**
|
||||||
* Create a new password controller instance.
|
* Create a new password controller instance.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Contracts\Auth\Guard $auth
|
* @param \Illuminate\Contracts\Auth\Guard $auth
|
||||||
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
|
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Jobs\GenerateTicket;
|
||||||
use App\Jobs\SendAttendeeInvite;
|
use App\Jobs\SendAttendeeInvite;
|
||||||
use App\Jobs\SendAttendeeTicket;
|
use App\Jobs\SendAttendeeTicket;
|
||||||
use App\Jobs\SendMessageToAttendees;
|
use App\Jobs\SendMessageToAttendees;
|
||||||
use App\Jobs\GenerateTicket;
|
|
||||||
use App\Models\Attendee;
|
use App\Models\Attendee;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\EventStats;
|
use App\Models\EventStats;
|
||||||
|
|
@ -13,16 +13,16 @@ use App\Models\Message;
|
||||||
use App\Models\Order;
|
use App\Models\Order;
|
||||||
use App\Models\OrderItem;
|
use App\Models\OrderItem;
|
||||||
use App\Models\Ticket;
|
use App\Models\Ticket;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Auth;
|
use Auth;
|
||||||
|
use Config;
|
||||||
use DB;
|
use DB;
|
||||||
use Excel;
|
use Excel;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Log;
|
||||||
use Mail;
|
use Mail;
|
||||||
use Omnipay\Omnipay;
|
use Omnipay\Omnipay;
|
||||||
use PDF;
|
use PDF;
|
||||||
use Validator;
|
use Validator;
|
||||||
use Config;
|
|
||||||
use Log;
|
|
||||||
|
|
||||||
class EventAttendeesController extends MyBaseController
|
class EventAttendeesController extends MyBaseController
|
||||||
{
|
{
|
||||||
|
|
@ -111,9 +111,9 @@ class EventAttendeesController extends MyBaseController
|
||||||
public function postInviteAttendee(Request $request, $event_id)
|
public function postInviteAttendee(Request $request, $event_id)
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'first_name' => 'required',
|
'first_name' => 'required',
|
||||||
'ticket_id' => 'required|exists:tickets,id,account_id,' . \Auth::user()->account_id,
|
'ticket_id' => 'required|exists:tickets,id,account_id,' . \Auth::user()->account_id,
|
||||||
'email' => 'email|required',
|
'email' => 'email|required',
|
||||||
];
|
];
|
||||||
|
|
||||||
$messages = [
|
$messages = [
|
||||||
|
|
@ -195,7 +195,7 @@ class EventAttendeesController extends MyBaseController
|
||||||
|
|
||||||
|
|
||||||
if ($email_attendee == '1') {
|
if ($email_attendee == '1') {
|
||||||
$this->dispatch(new SendAttendeeInvite($attendee));
|
$this->dispatch(new SendAttendeeInvite($attendee));
|
||||||
}
|
}
|
||||||
|
|
||||||
session()->flash('message', 'Attendee Successfully Invited');
|
session()->flash('message', 'Attendee Successfully Invited');
|
||||||
|
|
@ -529,11 +529,11 @@ class EventAttendeesController extends MyBaseController
|
||||||
Log::info($attendee);
|
Log::info($attendee);
|
||||||
|
|
||||||
|
|
||||||
$this->dispatch(new GenerateTicket($attendee->order->order_reference."-".$attendee->reference_index));
|
$this->dispatch(new GenerateTicket($attendee->order->order_reference . "-" . $attendee->reference_index));
|
||||||
|
|
||||||
$pdf_file_name = $attendee->order->order_reference.'-'.$attendee->reference_index;
|
$pdf_file_name = $attendee->order->order_reference . '-' . $attendee->reference_index;
|
||||||
$pdf_file_path = public_path(config('attendize.event_pdf_tickets_path')).'/'.$pdf_file_name;
|
$pdf_file_path = public_path(config('attendize.event_pdf_tickets_path')) . '/' . $pdf_file_name;
|
||||||
$pdf_file = $pdf_file_path.'.pdf';
|
$pdf_file = $pdf_file_path . '.pdf';
|
||||||
|
|
||||||
|
|
||||||
return response()->download($pdf_file);
|
return response()->download($pdf_file);
|
||||||
|
|
@ -718,7 +718,7 @@ class EventAttendeesController extends MyBaseController
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if($request->get('refund_attendee') == '1') {
|
if ($request->get('refund_attendee') == '1') {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// This does not account for an increased/decreased ticket price
|
// This does not account for an increased/decreased ticket price
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use App\Models\Attendee;
|
use App\Models\Attendee;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use DB;
|
use DB;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
use JavaScript;
|
use JavaScript;
|
||||||
|
|
||||||
class EventCheckInController extends MyBaseController
|
class EventCheckInController extends MyBaseController
|
||||||
|
|
@ -59,7 +59,8 @@ class EventCheckInController extends MyBaseController
|
||||||
$query->where('attendees.event_id', '=', $event_id);
|
$query->where('attendees.event_id', '=', $event_id);
|
||||||
})->where(function ($query) use ($searchQuery) {
|
})->where(function ($query) use ($searchQuery) {
|
||||||
$query->orWhere('attendees.first_name', 'like', $searchQuery . '%')
|
$query->orWhere('attendees.first_name', 'like', $searchQuery . '%')
|
||||||
->orWhere(DB::raw("CONCAT_WS(' ', attendees.first_name, attendees.last_name)"), 'like', $searchQuery . '%')
|
->orWhere(DB::raw("CONCAT_WS(' ', attendees.first_name, attendees.last_name)"), 'like',
|
||||||
|
$searchQuery . '%')
|
||||||
//->orWhere('attendees.email', 'like', $searchQuery . '%')
|
//->orWhere('attendees.email', 'like', $searchQuery . '%')
|
||||||
->orWhere('orders.order_reference', 'like', $searchQuery . '%')
|
->orWhere('orders.order_reference', 'like', $searchQuery . '%')
|
||||||
->orWhere('attendees.last_name', 'like', $searchQuery . '%');
|
->orWhere('attendees.last_name', 'like', $searchQuery . '%');
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ use App\Models\Event;
|
||||||
use App\Models\EventStats;
|
use App\Models\EventStats;
|
||||||
use App\Models\Order;
|
use App\Models\Order;
|
||||||
use App\Models\OrderItem;
|
use App\Models\OrderItem;
|
||||||
use App\Models\ReservedTickets;
|
|
||||||
use App\Models\QuestionAnswer;
|
use App\Models\QuestionAnswer;
|
||||||
|
use App\Models\ReservedTickets;
|
||||||
use App\Models\Ticket;
|
use App\Models\Ticket;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Cookie;
|
use Cookie;
|
||||||
|
|
@ -61,7 +61,7 @@ class EventCheckoutController extends Controller
|
||||||
|
|
||||||
if (!$request->has('tickets')) {
|
if (!$request->has('tickets')) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'error',
|
'status' => 'error',
|
||||||
'message' => 'No tickets selected',
|
'message' => 'No tickets selected',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
@ -311,7 +311,7 @@ class EventCheckoutController extends Controller
|
||||||
* Check if the user has chosen to pay offline
|
* Check if the user has chosen to pay offline
|
||||||
* and if they are allowed
|
* and if they are allowed
|
||||||
*/
|
*/
|
||||||
if($request->get('pay_offline') && $event->enable_offline_payments) {
|
if ($request->get('pay_offline') && $event->enable_offline_payments) {
|
||||||
return $this->completeOrder($event_id);
|
return $this->completeOrder($event_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -489,7 +489,7 @@ class EventCheckoutController extends Controller
|
||||||
if (isset($ticket_order['transaction_id'])) {
|
if (isset($ticket_order['transaction_id'])) {
|
||||||
$order->transaction_id = $ticket_order['transaction_id'][0];
|
$order->transaction_id = $ticket_order['transaction_id'][0];
|
||||||
}
|
}
|
||||||
if ($ticket_order['order_requires_payment'] && !isset($request_data['pay_offline']) ) {
|
if ($ticket_order['order_requires_payment'] && !isset($request_data['pay_offline'])) {
|
||||||
$order->payment_gateway_id = $ticket_order['payment_gateway']->id;
|
$order->payment_gateway_id = $ticket_order['payment_gateway']->id;
|
||||||
}
|
}
|
||||||
$order->first_name = $request_data['order_first_name'];
|
$order->first_name = $request_data['order_first_name'];
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@ namespace App\Http\Controllers;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\EventImage;
|
use App\Models\EventImage;
|
||||||
use App\Models\Organiser;
|
use App\Models\Organiser;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Auth;
|
use Auth;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
use Image;
|
use Image;
|
||||||
use Validator;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
use Validator;
|
||||||
|
|
||||||
class EventController extends MyBaseController
|
class EventController extends MyBaseController
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use File;
|
use File;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
use Image;
|
use Image;
|
||||||
use Validator;
|
use Validator;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
class EventCustomizeController extends MyBaseController
|
class EventCustomizeController extends MyBaseController
|
||||||
{
|
{
|
||||||
|
|
@ -225,7 +225,7 @@ class EventCustomizeController extends MyBaseController
|
||||||
$event->pre_order_display_message = trim($request->get('pre_order_display_message'));
|
$event->pre_order_display_message = trim($request->get('pre_order_display_message'));
|
||||||
$event->post_order_display_message = trim($request->get('post_order_display_message'));
|
$event->post_order_display_message = trim($request->get('post_order_display_message'));
|
||||||
$event->offline_payment_instructions = trim($request->get('offline_payment_instructions'));
|
$event->offline_payment_instructions = trim($request->get('offline_payment_instructions'));
|
||||||
$event->enable_offline_payments = (int) $request->get('enable_offline_payments');
|
$event->enable_offline_payments = (int)$request->get('enable_offline_payments');
|
||||||
$event->save();
|
$event->save();
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,9 @@ class EventDashboardController extends MyBaseController
|
||||||
* should be done in the DB
|
* should be done in the DB
|
||||||
*/
|
*/
|
||||||
$chartData = EventStats::where('event_id', '=', $event->id)
|
$chartData = EventStats::where('event_id', '=', $event->id)
|
||||||
->where('date', '>', Carbon::now()->subDays($num_days)->format('Y-m-d'))
|
->where('date', '>', Carbon::now()->subDays($num_days)->format('Y-m-d'))
|
||||||
->get()
|
->get()
|
||||||
->toArray();
|
->toArray();
|
||||||
|
|
||||||
$startDate = new DateTime("-$num_days days");
|
$startDate = new DateTime("-$num_days days");
|
||||||
$dateItter = new DatePeriod(
|
$dateItter = new DatePeriod(
|
||||||
|
|
@ -55,11 +55,11 @@ class EventDashboardController extends MyBaseController
|
||||||
|
|
||||||
foreach ($chartData as $item) {
|
foreach ($chartData as $item) {
|
||||||
if ($item['date'] == $date->format('Y-m-d')) {
|
if ($item['date'] == $date->format('Y-m-d')) {
|
||||||
$views = $item['views'];
|
$views = $item['views'];
|
||||||
$sales_volume = $item['sales_volume'];
|
$sales_volume = $item['sales_volume'];
|
||||||
$organiser_fees_volume = $item['organiser_fees_volume'];
|
$organiser_fees_volume = $item['organiser_fees_volume'];
|
||||||
$unique_views = $item['unique_views'];
|
$unique_views = $item['unique_views'];
|
||||||
$tickets_sold = $item['tickets_sold'];
|
$tickets_sold = $item['tickets_sold'];
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -74,7 +74,7 @@ class EventDashboardController extends MyBaseController
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($event->tickets as $ticket) {
|
foreach ($event->tickets as $ticket) {
|
||||||
$tickets_data[] = [
|
$tickets_data[] = [
|
||||||
'value' => $ticket->quantity_sold,
|
'value' => $ticket->quantity_sold,
|
||||||
'label' => $ticket->title,
|
'label' => $ticket->title,
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ namespace App\Http\Controllers;
|
||||||
use App\Models\Attendee;
|
use App\Models\Attendee;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\Order;
|
use App\Models\Order;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use DB;
|
use DB;
|
||||||
use Excel;
|
use Excel;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
use Log;
|
use Log;
|
||||||
use Mail;
|
use Mail;
|
||||||
use Omnipay;
|
use Omnipay;
|
||||||
|
|
@ -29,8 +29,8 @@ class EventOrdersController extends MyBaseController
|
||||||
$allowed_sorts = ['first_name', 'email', 'order_reference', 'order_status_id', 'created_at'];
|
$allowed_sorts = ['first_name', 'email', 'order_reference', 'order_status_id', 'created_at'];
|
||||||
|
|
||||||
$searchQuery = $request->get('q');
|
$searchQuery = $request->get('q');
|
||||||
$sort_by = (in_array($request->get('sort_by'), $allowed_sorts) ? $request->get('sort_by') : 'created_at');
|
$sort_by = (in_array($request->get('sort_by'), $allowed_sorts) ? $request->get('sort_by') : 'created_at');
|
||||||
$sort_order = $request->get('sort_order') == 'asc' ? 'asc' : 'desc';
|
$sort_order = $request->get('sort_order') == 'asc' ? 'asc' : 'desc';
|
||||||
|
|
||||||
$event = Event::scope()->find($event_id);
|
$event = Event::scope()->find($event_id);
|
||||||
|
|
||||||
|
|
@ -45,10 +45,10 @@ class EventOrdersController extends MyBaseController
|
||||||
|
|
||||||
$orders = $event->orders()
|
$orders = $event->orders()
|
||||||
->where(function ($query) use ($searchQuery) {
|
->where(function ($query) use ($searchQuery) {
|
||||||
$query->where('order_reference', 'like', $searchQuery.'%')
|
$query->where('order_reference', 'like', $searchQuery . '%')
|
||||||
->orWhere('first_name', 'like', $searchQuery.'%')
|
->orWhere('first_name', 'like', $searchQuery . '%')
|
||||||
->orWhere('email', 'like', $searchQuery.'%')
|
->orWhere('email', 'like', $searchQuery . '%')
|
||||||
->orWhere('last_name', 'like', $searchQuery.'%');
|
->orWhere('last_name', 'like', $searchQuery . '%');
|
||||||
})
|
})
|
||||||
->orderBy($sort_by, $sort_order)
|
->orderBy($sort_by, $sort_order)
|
||||||
->paginate();
|
->paginate();
|
||||||
|
|
@ -131,10 +131,10 @@ class EventOrdersController extends MyBaseController
|
||||||
|
|
||||||
$order = Order::scope()->findOrFail($order_id);
|
$order = Order::scope()->findOrFail($order_id);
|
||||||
|
|
||||||
$refund_order = ($request->get('refund_order') === 'on') ? true : false;
|
$refund_order = ($request->get('refund_order') === 'on') ? true : false;
|
||||||
$refund_type = $request->get('refund_type');
|
$refund_type = $request->get('refund_type');
|
||||||
$refund_amount = round(floatval($request->get('refund_amount')), 2);
|
$refund_amount = round(floatval($request->get('refund_amount')), 2);
|
||||||
$attendees = $request->get('attendees');
|
$attendees = $request->get('attendees');
|
||||||
$error_message = false;
|
$error_message = false;
|
||||||
|
|
||||||
if ($refund_order && $order->payment_gateway->can_refund) {
|
if ($refund_order && $order->payment_gateway->can_refund) {
|
||||||
|
|
@ -146,8 +146,11 @@ class EventOrdersController extends MyBaseController
|
||||||
$error_message = 'This order has already been refunded';
|
$error_message = 'This order has already been refunded';
|
||||||
} elseif ($order->organiser_amount == 0) {
|
} elseif ($order->organiser_amount == 0) {
|
||||||
$error_message = 'Nothing to refund';
|
$error_message = 'Nothing to refund';
|
||||||
} elseif ($refund_type !== 'full' && $refund_amount > round(($order->organiser_amount - $order->amount_refunded), 2)) {
|
} elseif ($refund_type !== 'full' && $refund_amount > round(($order->organiser_amount - $order->amount_refunded),
|
||||||
$error_message = 'The maximum amount you can refund is '.(money($order->organiser_amount - $order->amount_refunded, $order->event->currency));
|
2)
|
||||||
|
) {
|
||||||
|
$error_message = 'The maximum amount you can refund is ' . (money($order->organiser_amount - $order->amount_refunded,
|
||||||
|
$order->event->currency));
|
||||||
}
|
}
|
||||||
if (!$error_message) {
|
if (!$error_message) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -210,7 +213,7 @@ class EventOrdersController extends MyBaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
\Session::flash('message',
|
\Session::flash('message',
|
||||||
(!$refund_amount && !$attendees) ? 'Nothing To Do' : 'Successfully '.($refund_order ? ' Refunded Order' : ' ').($attendees && $refund_order ? ' & ' : '').($attendees ? 'Cancelled Attendee(s)' : ''));
|
(!$refund_amount && !$attendees) ? 'Nothing To Do' : 'Successfully ' . ($refund_order ? ' Refunded Order' : ' ') . ($attendees && $refund_order ? ' & ' : '') . ($attendees ? 'Cancelled Attendee(s)' : ''));
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
|
|
@ -228,9 +231,9 @@ class EventOrdersController extends MyBaseController
|
||||||
{
|
{
|
||||||
$event = Event::scope()->findOrFail($event_id);
|
$event = Event::scope()->findOrFail($event_id);
|
||||||
|
|
||||||
Excel::create('orders-as-of-'.date('d-m-Y-g.i.a'), function ($excel) use ($event) {
|
Excel::create('orders-as-of-' . date('d-m-Y-g.i.a'), function ($excel) use ($event) {
|
||||||
|
|
||||||
$excel->setTitle('Orders For Event: '.$event->title);
|
$excel->setTitle('Orders For Event: ' . $event->title);
|
||||||
|
|
||||||
// Chain the setters
|
// Chain the setters
|
||||||
$excel->setCreator(config('attendize.app_name'))
|
$excel->setCreator(config('attendize.app_name'))
|
||||||
|
|
@ -259,7 +262,15 @@ class EventOrdersController extends MyBaseController
|
||||||
|
|
||||||
// Add headings to first row
|
// Add headings to first row
|
||||||
$sheet->row(1, [
|
$sheet->row(1, [
|
||||||
'First Name', 'Last Name', 'Email', 'Order Reference', 'Amount', 'Fully Refunded', 'Partially Refunded', 'Amount Refunded', 'Order Date',
|
'First Name',
|
||||||
|
'Last Name',
|
||||||
|
'Email',
|
||||||
|
'Order Reference',
|
||||||
|
'Amount',
|
||||||
|
'Fully Refunded',
|
||||||
|
'Partially Refunded',
|
||||||
|
'Amount Refunded',
|
||||||
|
'Order Date',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Set gray background on first row
|
// Set gray background on first row
|
||||||
|
|
@ -282,8 +293,8 @@ class EventOrdersController extends MyBaseController
|
||||||
$order = Order::scope()->findOrFail($order_id);
|
$order = Order::scope()->findOrFail($order_id);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'order' => $order,
|
'order' => $order,
|
||||||
'event' => $order->event,
|
'event' => $order->event,
|
||||||
];
|
];
|
||||||
|
|
||||||
return view('ManageEvent.Modals.MessageOrder', $data);
|
return view('ManageEvent.Modals.MessageOrder', $data);
|
||||||
|
|
@ -335,7 +346,7 @@ class EventOrdersController extends MyBaseController
|
||||||
$message->to($order->event->organiser->email)
|
$message->to($order->event->organiser->email)
|
||||||
->from(config('attendize.outgoing_email_noreply'), $order->event->organiser->name)
|
->from(config('attendize.outgoing_email_noreply'), $order->event->organiser->name)
|
||||||
->replyTo($order->event->organiser->email, $order->event->organiser->name)
|
->replyTo($order->event->organiser->email, $order->event->organiser->name)
|
||||||
->subject($data['subject'].' [Organiser copy]');
|
->subject($data['subject'] . ' [Organiser copy]');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -352,7 +363,8 @@ class EventOrdersController extends MyBaseController
|
||||||
* @param $order_id
|
* @param $order_id
|
||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
*/
|
*/
|
||||||
public function postMarkPaymentReceived(Request $request, $order_id) {
|
public function postMarkPaymentReceived(Request $request, $order_id)
|
||||||
|
{
|
||||||
$order = Order::scope()->findOrFail($order_id);
|
$order = Order::scope()->findOrFail($order_id);
|
||||||
|
|
||||||
$order->is_payment_received = 1;
|
$order->is_payment_received = 1;
|
||||||
|
|
@ -363,7 +375,7 @@ class EventOrdersController extends MyBaseController
|
||||||
session()->flash('message', 'Order Payment Status Successfully Updated');
|
session()->flash('message', 'Order Payment Status Successfully Updated');
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ class EventPromoteController extends MyBaseController
|
||||||
public function showPromote($event_id)
|
public function showPromote($event_id)
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'event' => Event::scope()->find($event_id),
|
'event' => Event::scope()->find($event_id),
|
||||||
];
|
];
|
||||||
|
|
||||||
return view('ManageEvent.Promote', $data);
|
return view('ManageEvent.Promote', $data);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use App\Http\Requests;
|
use App\Http\Requests;
|
||||||
use App\Models\Attendee;
|
use App\Models\Attendee;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
|
|
@ -29,7 +28,7 @@ class EventQrcodeCheckInController extends Controller
|
||||||
return view('ManageEvent.QrcodeCheckIn', compact('event'));
|
return view('ManageEvent.QrcodeCheckIn', compact('event'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check in an attendee
|
* Check in an attendee
|
||||||
*
|
*
|
||||||
* @param $event_id
|
* @param $event_id
|
||||||
|
|
@ -43,43 +42,43 @@ class EventQrcodeCheckInController extends Controller
|
||||||
$qrcodeToken = $request->get('qrcode_token');
|
$qrcodeToken = $request->get('qrcode_token');
|
||||||
|
|
||||||
$attendee = Attendee::scope()->withoutCancelled()
|
$attendee = Attendee::scope()->withoutCancelled()
|
||||||
->join('tickets', 'tickets.id', '=', 'attendees.ticket_id')
|
->join('tickets', 'tickets.id', '=', 'attendees.ticket_id')
|
||||||
->where(function ($query) use ($event, $qrcodeToken) {
|
->where(function ($query) use ($event, $qrcodeToken) {
|
||||||
$query->where('attendees.event_id', $event->id)
|
$query->where('attendees.event_id', $event->id)
|
||||||
->where('attendees.private_reference_number', $qrcodeToken);
|
->where('attendees.private_reference_number', $qrcodeToken);
|
||||||
})->select([
|
})->select([
|
||||||
'attendees.id',
|
'attendees.id',
|
||||||
'attendees.order_id',
|
'attendees.order_id',
|
||||||
'attendees.first_name',
|
'attendees.first_name',
|
||||||
'attendees.last_name',
|
'attendees.last_name',
|
||||||
'attendees.email',
|
'attendees.email',
|
||||||
'attendees.reference',
|
'attendees.reference',
|
||||||
'attendees.arrival_time',
|
'attendees.arrival_time',
|
||||||
'attendees.has_arrived',
|
'attendees.has_arrived',
|
||||||
'tickets.title as ticket',
|
'tickets.title as ticket',
|
||||||
])->first();
|
])->first();
|
||||||
|
|
||||||
if (is_null($attendee)){
|
if (is_null($attendee)) {
|
||||||
return response()->json(['status' => 'error', 'message' => "Invalid Ticket! Please try again."]);
|
return response()->json(['status' => 'error', 'message' => "Invalid Ticket! Please try again."]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$relatedAttendesCount = Attendee::where('id', '!=', $attendee->id)
|
$relatedAttendesCount = Attendee::where('id', '!=', $attendee->id)
|
||||||
->where([
|
->where([
|
||||||
'order_id' => $attendee->order_id,
|
'order_id' => $attendee->order_id,
|
||||||
'has_arrived' => false
|
'has_arrived' => false
|
||||||
])->count();
|
])->count();
|
||||||
|
|
||||||
$appendedText = '';
|
$appendedText = '';
|
||||||
if ($relatedAttendesCount >= 1){
|
if ($relatedAttendesCount >= 1) {
|
||||||
$confirmOrderTicketsRoute = route('confirmCheckInOrderTickets', [$event->id, $attendee->order_id]);
|
$confirmOrderTicketsRoute = route('confirmCheckInOrderTickets', [$event->id, $attendee->order_id]);
|
||||||
|
|
||||||
$appendedText = '<br><br><form class="ajax" action="'. $confirmOrderTicketsRoute .'" method="POST">'. csrf_field() .'<button class="btn btn-primary btn-sm" type="submit"><i class="ico-ticket"></i> Check in all tickets associated to this order</button></form>';
|
$appendedText = '<br><br><form class="ajax" action="' . $confirmOrderTicketsRoute . '" method="POST">' . csrf_field() . '<button class="btn btn-primary btn-sm" type="submit"><i class="ico-ticket"></i> Check in all tickets associated to this order</button></form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($attendee->has_arrived) {
|
if ($attendee->has_arrived) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'error',
|
'status' => 'error',
|
||||||
'message' => 'Warning: This attendee has already been checked in at '. $attendee->arrival_time->format('H:i A, F j'). '.' . $appendedText
|
'message' => 'Warning: This attendee has already been checked in at ' . $attendee->arrival_time->format('H:i A, F j') . '.' . $appendedText
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -87,7 +86,7 @@ class EventQrcodeCheckInController extends Controller
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'message' => 'Success !<br>Name: ' . $attendee->first_name . ' ' . $attendee->last_name . '<br>Reference: '. $attendee->reference . '<br>Ticket: '. $attendee->ticket . '.' . $appendedText
|
'message' => 'Success !<br>Name: ' . $attendee->first_name . ' ' . $attendee->last_name . '<br>Reference: ' . $attendee->reference . '<br>Ticket: ' . $attendee->ticket . '.' . $appendedText
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -100,13 +99,13 @@ class EventQrcodeCheckInController extends Controller
|
||||||
*/
|
*/
|
||||||
public function confirmOrderTickets($event_id, $order_id)
|
public function confirmOrderTickets($event_id, $order_id)
|
||||||
{
|
{
|
||||||
$updateRowsCount = Attendee::scope()->where([
|
$updateRowsCount = Attendee::scope()->where([
|
||||||
'event_id' => $event_id,
|
'event_id' => $event_id,
|
||||||
'order_id' => $order_id,
|
'order_id' => $order_id,
|
||||||
'has_arrived' => false,
|
'has_arrived' => false,
|
||||||
'arrival_time' => Carbon::now(),
|
'arrival_time' => Carbon::now(),
|
||||||
])
|
])
|
||||||
->update(['has_arrived' => true, 'arrival_time' => Carbon::now()]);
|
->update(['has_arrived' => true, 'arrival_time' => Carbon::now()]);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'message' => $updateRowsCount . ' Attendee(s) Checked in.'
|
'message' => $updateRowsCount . ' Attendee(s) Checked in.'
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,5 @@ namespace App\Http\Controllers;
|
||||||
|
|
||||||
class EventQuestionsController extends MyBaseController
|
class EventQuestionsController extends MyBaseController
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,14 +3,14 @@
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Http\Requests\StoreEventQuestionRequest;
|
use App\Http\Requests\StoreEventQuestionRequest;
|
||||||
use App\Models\Event;
|
|
||||||
use App\Models\Attendee;
|
use App\Models\Attendee;
|
||||||
|
use App\Models\Event;
|
||||||
use App\Models\Question;
|
use App\Models\Question;
|
||||||
use App\Models\QuestionAnswer;
|
use App\Models\QuestionAnswer;
|
||||||
use App\Models\QuestionType;
|
use App\Models\QuestionType;
|
||||||
use JavaScript;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Excel;
|
use Excel;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use JavaScript;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,10 @@ class EventTicketsController extends MyBaseController
|
||||||
public function showTickets(Request $request, $event_id)
|
public function showTickets(Request $request, $event_id)
|
||||||
{
|
{
|
||||||
$allowed_sorts = [
|
$allowed_sorts = [
|
||||||
'created_at' => 'Creation date',
|
'created_at' => 'Creation date',
|
||||||
'title' => 'Ticket title',
|
'title' => 'Ticket title',
|
||||||
'quantity_sold' => 'Quantity sold',
|
'quantity_sold' => 'Quantity sold',
|
||||||
'sales_volume' => 'Sales volume',
|
'sales_volume' => 'Sales volume',
|
||||||
];
|
];
|
||||||
|
|
||||||
// Getting get parameters.
|
// Getting get parameters.
|
||||||
|
|
@ -43,8 +43,8 @@ class EventTicketsController extends MyBaseController
|
||||||
|
|
||||||
// Get tickets for event.
|
// Get tickets for event.
|
||||||
$tickets = empty($q) === false
|
$tickets = empty($q) === false
|
||||||
? $event->tickets()->where('title', 'like', '%'.$q.'%')->orderBy($sort_by, 'desc')->paginate()
|
? $event->tickets()->where('title', 'like', '%' . $q . '%')->orderBy($sort_by, 'desc')->paginate()
|
||||||
: $event->tickets()->orderBy($sort_by, 'desc')->paginate();
|
: $event->tickets()->orderBy($sort_by, 'desc')->paginate();
|
||||||
|
|
||||||
// Return view.
|
// Return view.
|
||||||
return view('ManageEvent.Tickets', compact('event', 'tickets', 'sort_by', 'q', 'allowed_sorts'));
|
return view('ManageEvent.Tickets', compact('event', 'tickets', 'sort_by', 'q', 'allowed_sorts'));
|
||||||
|
|
@ -97,15 +97,17 @@ class EventTicketsController extends MyBaseController
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ticket->event_id = $event_id;
|
$ticket->event_id = $event_id;
|
||||||
$ticket->title = $request->get('title');
|
$ticket->title = $request->get('title');
|
||||||
$ticket->quantity_available = !$request->get('quantity_available') ? null : $request->get('quantity_available');
|
$ticket->quantity_available = !$request->get('quantity_available') ? null : $request->get('quantity_available');
|
||||||
$ticket->start_sale_date = $request->get('start_sale_date') ? Carbon::createFromFormat('d-m-Y H:i', $request->get('start_sale_date')) : null;
|
$ticket->start_sale_date = $request->get('start_sale_date') ? Carbon::createFromFormat('d-m-Y H:i',
|
||||||
$ticket->end_sale_date = $request->get('end_sale_date') ? Carbon::createFromFormat('d-m-Y H:i', $request->get('end_sale_date')) : null;
|
$request->get('start_sale_date')) : null;
|
||||||
$ticket->price = $request->get('price');
|
$ticket->end_sale_date = $request->get('end_sale_date') ? Carbon::createFromFormat('d-m-Y H:i',
|
||||||
$ticket->min_per_person = $request->get('min_per_person');
|
$request->get('end_sale_date')) : null;
|
||||||
$ticket->max_per_person = $request->get('max_per_person');
|
$ticket->price = $request->get('price');
|
||||||
$ticket->description = $request->get('description');
|
$ticket->min_per_person = $request->get('min_per_person');
|
||||||
|
$ticket->max_per_person = $request->get('max_per_person');
|
||||||
|
$ticket->description = $request->get('description');
|
||||||
|
|
||||||
$ticket->save();
|
$ticket->save();
|
||||||
|
|
||||||
|
|
@ -211,7 +213,10 @@ class EventTicketsController extends MyBaseController
|
||||||
/*
|
/*
|
||||||
* Override some validation rules
|
* Override some validation rules
|
||||||
*/
|
*/
|
||||||
$validation_rules['quantity_available'] = ['integer', 'min:'.($ticket->quantity_sold + $ticket->quantity_reserved)];
|
$validation_rules['quantity_available'] = [
|
||||||
|
'integer',
|
||||||
|
'min:' . ($ticket->quantity_sold + $ticket->quantity_reserved)
|
||||||
|
];
|
||||||
$validation_messages['quantity_available.min'] = 'Quantity available can\'t be less the amount sold or reserved.';
|
$validation_messages['quantity_available.min'] = 'Quantity available can\'t be less the amount sold or reserved.';
|
||||||
|
|
||||||
$ticket->rules = $validation_rules + $ticket->rules;
|
$ticket->rules = $validation_rules + $ticket->rules;
|
||||||
|
|
@ -224,14 +229,16 @@ class EventTicketsController extends MyBaseController
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ticket->title = $request->get('title');
|
$ticket->title = $request->get('title');
|
||||||
$ticket->quantity_available = !$request->get('quantity_available') ? null : $request->get('quantity_available');
|
$ticket->quantity_available = !$request->get('quantity_available') ? null : $request->get('quantity_available');
|
||||||
$ticket->price = $request->get('price');
|
$ticket->price = $request->get('price');
|
||||||
$ticket->start_sale_date = $request->get('start_sale_date') ? Carbon::createFromFormat('d-m-Y H:i', $request->get('start_sale_date')) : null;
|
$ticket->start_sale_date = $request->get('start_sale_date') ? Carbon::createFromFormat('d-m-Y H:i',
|
||||||
$ticket->end_sale_date = $request->get('end_sale_date') ? Carbon::createFromFormat('d-m-Y H:i', $request->get('end_sale_date')) : null;
|
$request->get('start_sale_date')) : null;
|
||||||
$ticket->description = $request->get('description');
|
$ticket->end_sale_date = $request->get('end_sale_date') ? Carbon::createFromFormat('d-m-Y H:i',
|
||||||
$ticket->min_per_person = $request->get('min_per_person');
|
$request->get('end_sale_date')) : null;
|
||||||
$ticket->max_per_person = $request->get('max_per_person');
|
$ticket->description = $request->get('description');
|
||||||
|
$ticket->min_per_person = $request->get('min_per_person');
|
||||||
|
$ticket->max_per_person = $request->get('max_per_person');
|
||||||
|
|
||||||
$ticket->save();
|
$ticket->save();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ class EventViewController extends Controller
|
||||||
|
|
||||||
$affiliate->save();
|
$affiliate->save();
|
||||||
|
|
||||||
Cookie::queue('affiliate_'.$event_id, $affiliate_ref, 60 * 24 * 60);
|
Cookie::queue('affiliate_' . $event_id, $affiliate_ref, 60 * 24 * 60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -116,7 +116,7 @@ class EventViewController extends Controller
|
||||||
$message->to($event->organiser->email, $event->organiser->name)
|
$message->to($event->organiser->email, $event->organiser->name)
|
||||||
->from(config('attendize.outgoing_email_noreply'), $data['sender_name'])
|
->from(config('attendize.outgoing_email_noreply'), $data['sender_name'])
|
||||||
->replyTo($data['sender_email'], $data['sender_name'])
|
->replyTo($data['sender_email'], $data['sender_name'])
|
||||||
->subject('Message Regarding: '.$event->title);
|
->subject('Message Regarding: ' . $event->title);
|
||||||
});
|
});
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,7 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Http\Requests\StoreEventQuestionRequest;
|
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\Question;
|
|
||||||
use App\Models\QuestionType;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -34,5 +31,4 @@ class EventWidgetsController extends MyBaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ class ImageController extends Controller
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a thumbnail for a given image
|
* Generate a thumbnail for a given image
|
||||||
*
|
*
|
||||||
* @param $image_src
|
* @param $image_src
|
||||||
* @param bool $width
|
* @param bool $width
|
||||||
* @param bool $height
|
* @param bool $height
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,6 @@ use Artisan;
|
||||||
use Config;
|
use Config;
|
||||||
use DB;
|
use DB;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Input;
|
|
||||||
use Redirect;
|
|
||||||
use Response;
|
|
||||||
use View;
|
|
||||||
|
|
||||||
class InstallerController extends Controller
|
class InstallerController extends Controller
|
||||||
{
|
{
|
||||||
|
|
@ -122,26 +118,26 @@ class InstallerController extends Controller
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$config = "APP_ENV=production\n".
|
$config = "APP_ENV=production\n" .
|
||||||
"APP_DEBUG=false\n".
|
"APP_DEBUG=false\n" .
|
||||||
"APP_URL={$app_url}\n".
|
"APP_URL={$app_url}\n" .
|
||||||
"APP_KEY={$app_key}\n".
|
"APP_KEY={$app_key}\n" .
|
||||||
"DB_TYPE={$database['type']}\n".
|
"DB_TYPE={$database['type']}\n" .
|
||||||
"DB_HOST={$database['host']}\n".
|
"DB_HOST={$database['host']}\n" .
|
||||||
"DB_DATABASE={$database['name']}\n".
|
"DB_DATABASE={$database['name']}\n" .
|
||||||
"DB_USERNAME={$database['username']}\n".
|
"DB_USERNAME={$database['username']}\n" .
|
||||||
"DB_PASSWORD={$database['password']}\n\n".
|
"DB_PASSWORD={$database['password']}\n\n" .
|
||||||
"MAIL_DRIVER={$mail['driver']}\n".
|
"MAIL_DRIVER={$mail['driver']}\n" .
|
||||||
"MAIL_PORT={$mail['port']}\n".
|
"MAIL_PORT={$mail['port']}\n" .
|
||||||
"MAIL_ENCRYPTION={$mail['encryption']}\n".
|
"MAIL_ENCRYPTION={$mail['encryption']}\n" .
|
||||||
"MAIL_HOST={$mail['host']}\n".
|
"MAIL_HOST={$mail['host']}\n" .
|
||||||
"MAIL_USERNAME={$mail['username']}\n".
|
"MAIL_USERNAME={$mail['username']}\n" .
|
||||||
"MAIL_FROM_NAME=\"{$mail['from_name']}\"\n".
|
"MAIL_FROM_NAME=\"{$mail['from_name']}\"\n" .
|
||||||
"MAIL_FROM_ADDRESS={$mail['from_address']}\n".
|
"MAIL_FROM_ADDRESS={$mail['from_address']}\n" .
|
||||||
"WKHTML2PDF_BIN_FILE=wkhtmltopdf-amd64\n".
|
"WKHTML2PDF_BIN_FILE=wkhtmltopdf-amd64\n" .
|
||||||
"MAIL_PASSWORD={$mail['password']}\n\n";
|
"MAIL_PASSWORD={$mail['password']}\n\n";
|
||||||
|
|
||||||
$fp = fopen(base_path().'/.env', 'w');
|
$fp = fopen(base_path() . '/.env', 'w');
|
||||||
fwrite($fp, $config);
|
fwrite($fp, $config);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
|
|
@ -162,7 +158,7 @@ class InstallerController extends Controller
|
||||||
}
|
}
|
||||||
Artisan::call('optimize', ['--force' => true]);
|
Artisan::call('optimize', ['--force' => true]);
|
||||||
|
|
||||||
$fp = fopen(base_path().'/installed', 'w');
|
$fp = fopen(base_path() . '/installed', 'w');
|
||||||
fwrite($fp, $version);
|
fwrite($fp, $version);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@ use App\Models\PaymentGateway;
|
||||||
use App\Models\Timezone;
|
use App\Models\Timezone;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Auth;
|
use Auth;
|
||||||
|
use Hash;
|
||||||
use HttpClient;
|
use HttpClient;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Input;
|
use Input;
|
||||||
use Validator;
|
|
||||||
use Hash;
|
|
||||||
use Mail;
|
use Mail;
|
||||||
|
use Validator;
|
||||||
|
|
||||||
class ManageAccountController extends MyBaseController
|
class ManageAccountController extends MyBaseController
|
||||||
{
|
{
|
||||||
|
|
@ -27,10 +27,10 @@ class ManageAccountController extends MyBaseController
|
||||||
public function showEditAccount(Request $request)
|
public function showEditAccount(Request $request)
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'account' => Account::find(Auth::user()->account_id),
|
'account' => Account::find(Auth::user()->account_id),
|
||||||
'timezones' => Timezone::lists('location', 'id'),
|
'timezones' => Timezone::lists('location', 'id'),
|
||||||
'currencies' => Currency::lists('title', 'id'),
|
'currencies' => Currency::lists('title', 'id'),
|
||||||
'payment_gateways' => PaymentGateway::lists('provider_name', 'id'),
|
'payment_gateways' => PaymentGateway::lists('provider_name', 'id'),
|
||||||
'account_payment_gateways' => AccountPaymentGateway::scope()->get()
|
'account_payment_gateways' => AccountPaymentGateway::scope()->get()
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -49,12 +49,12 @@ class ManageAccountController extends MyBaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
$request = [
|
$request = [
|
||||||
'url' => 'https://connect.stripe.com/oauth/token',
|
'url' => 'https://connect.stripe.com/oauth/token',
|
||||||
'params' => [
|
'params' => [
|
||||||
|
|
||||||
'client_secret' => STRIPE_SECRET_KEY,
|
'client_secret' => STRIPE_SECRET_KEY,
|
||||||
'code' => Input::get('code'),
|
'code' => Input::get('code'),
|
||||||
'grant_type' => 'authorization_code',
|
'grant_type' => 'authorization_code',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -70,10 +70,10 @@ class ManageAccountController extends MyBaseController
|
||||||
|
|
||||||
$account = Account::find(\Auth::user()->account_id);
|
$account = Account::find(\Auth::user()->account_id);
|
||||||
|
|
||||||
$account->stripe_access_token = $content->access_token;
|
$account->stripe_access_token = $content->access_token;
|
||||||
$account->stripe_refresh_token = $content->refresh_token;
|
$account->stripe_refresh_token = $content->refresh_token;
|
||||||
$account->stripe_publishable_key = $content->stripe_publishable_key;
|
$account->stripe_publishable_key = $content->stripe_publishable_key;
|
||||||
$account->stripe_data_raw = json_encode($content);
|
$account->stripe_data_raw = json_encode($content);
|
||||||
|
|
||||||
$account->save();
|
$account->save();
|
||||||
|
|
||||||
|
|
@ -94,21 +94,21 @@ class ManageAccountController extends MyBaseController
|
||||||
|
|
||||||
if (!$account->validate(Input::all())) {
|
if (!$account->validate(Input::all())) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'error',
|
'status' => 'error',
|
||||||
'messages' => $account->errors(),
|
'messages' => $account->errors(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$account->first_name = Input::get('first_name');
|
$account->first_name = Input::get('first_name');
|
||||||
$account->last_name = Input::get('last_name');
|
$account->last_name = Input::get('last_name');
|
||||||
$account->email = Input::get('email');
|
$account->email = Input::get('email');
|
||||||
$account->timezone_id = Input::get('timezone_id');
|
$account->timezone_id = Input::get('timezone_id');
|
||||||
$account->currency_id = Input::get('currency_id');
|
$account->currency_id = Input::get('currency_id');
|
||||||
$account->save();
|
$account->save();
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'id' => $account->id,
|
'id' => $account->id,
|
||||||
'message' => 'Account Successfully Updated',
|
'message' => 'Account Successfully Updated',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
@ -139,7 +139,7 @@ class ManageAccountController extends MyBaseController
|
||||||
$account_payment_gateway = AccountPaymentGateway::firstOrNew(
|
$account_payment_gateway = AccountPaymentGateway::firstOrNew(
|
||||||
[
|
[
|
||||||
'payment_gateway_id' => $gateway_id,
|
'payment_gateway_id' => $gateway_id,
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
]);
|
]);
|
||||||
$account_payment_gateway->config = $config;
|
$account_payment_gateway->config = $config;
|
||||||
$account_payment_gateway->account_id = $account->id;
|
$account_payment_gateway->account_id = $account->id;
|
||||||
|
|
@ -150,8 +150,8 @@ class ManageAccountController extends MyBaseController
|
||||||
$account->save();
|
$account->save();
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'id' => $account_payment_gateway->id,
|
'id' => $account_payment_gateway->id,
|
||||||
'message' => 'Payment Information Successfully Updated',
|
'message' => 'Payment Information Successfully Updated',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
@ -177,7 +177,7 @@ class ManageAccountController extends MyBaseController
|
||||||
|
|
||||||
if ($validation->fails()) {
|
if ($validation->fails()) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'error',
|
'status' => 'error',
|
||||||
'messages' => $validation->messages()->toArray(),
|
'messages' => $validation->messages()->toArray(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
@ -186,25 +186,25 @@ class ManageAccountController extends MyBaseController
|
||||||
|
|
||||||
$user = new User();
|
$user = new User();
|
||||||
|
|
||||||
$user->email = Input::get('email');
|
$user->email = Input::get('email');
|
||||||
$user->password = Hash::make($temp_password);
|
$user->password = Hash::make($temp_password);
|
||||||
$user->account_id = Auth::user()->account_id;
|
$user->account_id = Auth::user()->account_id;
|
||||||
|
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'temp_password' => $temp_password,
|
'temp_password' => $temp_password,
|
||||||
'inviter' => Auth::user(),
|
'inviter' => Auth::user(),
|
||||||
];
|
];
|
||||||
|
|
||||||
Mail::send('Emails.inviteUser', $data, function ($message) use ($data) {
|
Mail::send('Emails.inviteUser', $data, function ($message) use ($data) {
|
||||||
$message->to($data['user']->email)
|
$message->to($data['user']->email)
|
||||||
->subject($data['inviter']->first_name . ' ' . $data['inviter']->last_name . ' added you to an '. config('attendize.app_name') .' account.');
|
->subject($data['inviter']->first_name . ' ' . $data['inviter']->last_name . ' added you to an ' . config('attendize.app_name') . ' account.');
|
||||||
});
|
});
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'message' => 'Success! <b>' . $user->email . '</b> has been sent further instructions.',
|
'message' => 'Success! <b>' . $user->email . '</b> has been sent further instructions.',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
|
|
||||||
use App\Models\Organiser;
|
use App\Models\Organiser;
|
||||||
use Auth;
|
use Auth;
|
||||||
use JavaScript;
|
use JavaScript;
|
||||||
|
|
@ -18,17 +17,17 @@ class MyBaseController extends Controller
|
||||||
* Set up JS across all views
|
* Set up JS across all views
|
||||||
*/
|
*/
|
||||||
JavaScript::put([
|
JavaScript::put([
|
||||||
'User' => [
|
'User' => [
|
||||||
'full_name' => Auth::user()->full_name,
|
'full_name' => Auth::user()->full_name,
|
||||||
'email' => Auth::user()->email,
|
'email' => Auth::user()->email,
|
||||||
'is_confirmed' => Auth::user()->is_confirmed,
|
'is_confirmed' => Auth::user()->is_confirmed,
|
||||||
],
|
],
|
||||||
/*
|
/*
|
||||||
* @todo These should be user selectable
|
* @todo These should be user selectable
|
||||||
*/
|
*/
|
||||||
'DateFormat' => 'dd-MM-yyyy',
|
'DateFormat' => 'dd-MM-yyyy',
|
||||||
'DateTimeFormat' => 'dd-MM-yyyy hh:mm',
|
'DateTimeFormat' => 'dd-MM-yyyy hh:mm',
|
||||||
'GenericErrorMessage' => 'Whoops! An unknown error has occurred. Please try again or contact support if the problem persists.'
|
'GenericErrorMessage' => 'Whoops! An unknown error has occurred. Please try again or contact support if the problem persists.'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -40,7 +39,7 @@ class MyBaseController extends Controller
|
||||||
/**
|
/**
|
||||||
* Returns data which is required in each view, optionally combined with additional data.
|
* Returns data which is required in each view, optionally combined with additional data.
|
||||||
*
|
*
|
||||||
* @param int $event_id
|
* @param int $event_id
|
||||||
* @param array $additional_data
|
* @param array $additional_data
|
||||||
*
|
*
|
||||||
* @return arrau
|
* @return arrau
|
||||||
|
|
@ -51,12 +50,12 @@ class MyBaseController extends Controller
|
||||||
|
|
||||||
$image_path = $event->organiser->full_logo_path;
|
$image_path = $event->organiser->full_logo_path;
|
||||||
if ($event->images->first() != null) {
|
if ($event->images->first() != null) {
|
||||||
$image_path = $event->images()->first()->image_path;
|
$image_path = $event->images()->first()->image_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
return array_merge([
|
return array_merge([
|
||||||
'event' => $event,
|
'event' => $event,
|
||||||
'questions' => $event->questions()->get(),
|
'questions' => $event->questions()->get(),
|
||||||
'image_path' => $image_path,
|
'image_path' => $image_path,
|
||||||
], $additional_data);
|
], $additional_data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,18 +45,18 @@ class OrganiserController extends MyBaseController
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$organiser->name = $request->get('name');
|
$organiser->name = $request->get('name');
|
||||||
$organiser->about = $request->get('about');
|
$organiser->about = $request->get('about');
|
||||||
$organiser->email = $request->get('email');
|
$organiser->email = $request->get('email');
|
||||||
$organiser->facebook = $request->get('facebook');
|
$organiser->facebook = $request->get('facebook');
|
||||||
$organiser->twitter = $request->get('twitter');
|
$organiser->twitter = $request->get('twitter');
|
||||||
$organiser->confirmation_key = str_random(15);
|
$organiser->confirmation_key = str_random(15);
|
||||||
|
|
||||||
if ($request->hasFile('organiser_logo')) {
|
if ($request->hasFile('organiser_logo')) {
|
||||||
$path = public_path().'/'.config('attendize.organiser_images_path');
|
$path = public_path() . '/' . config('attendize.organiser_images_path');
|
||||||
$filename = 'organiser_logo-'.$organiser->id.'.'.strtolower($request->file('organiser_logo')->getClientOriginalExtension());
|
$filename = 'organiser_logo-' . $organiser->id . '.' . strtolower($request->file('organiser_logo')->getClientOriginalExtension());
|
||||||
|
|
||||||
$file_full_path = $path.'/'.$filename;
|
$file_full_path = $path . '/' . $filename;
|
||||||
|
|
||||||
$request->file('organiser_logo')->move($path, $filename);
|
$request->file('organiser_logo')->move($path, $filename);
|
||||||
|
|
||||||
|
|
@ -69,7 +69,7 @@ class OrganiserController extends MyBaseController
|
||||||
$img->save($file_full_path);
|
$img->save($file_full_path);
|
||||||
|
|
||||||
if (file_exists($file_full_path)) {
|
if (file_exists($file_full_path)) {
|
||||||
$organiser->logo_path = config('attendize.organiser_images_path').'/'.$filename;
|
$organiser->logo_path = config('attendize.organiser_images_path') . '/' . $filename;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\Organiser;
|
use App\Models\Organiser;
|
||||||
use File;
|
use File;
|
||||||
use Image;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Image;
|
||||||
use Validator;
|
use Validator;
|
||||||
|
|
||||||
class OrganiserCustomizeController extends MyBaseController
|
class OrganiserCustomizeController extends MyBaseController
|
||||||
|
|
@ -43,12 +43,12 @@ class OrganiserCustomizeController extends MyBaseController
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$organiser->name = $request->get('name');
|
$organiser->name = $request->get('name');
|
||||||
$organiser->about = $request->get('about');
|
$organiser->about = $request->get('about');
|
||||||
$organiser->email = $request->get('email');
|
$organiser->email = $request->get('email');
|
||||||
$organiser->enable_organiser_page = $request->get('enable_organiser_page');
|
$organiser->enable_organiser_page = $request->get('enable_organiser_page');
|
||||||
$organiser->facebook = $request->get('facebook');
|
$organiser->facebook = $request->get('facebook');
|
||||||
$organiser->twitter = $request->get('twitter');
|
$organiser->twitter = $request->get('twitter');
|
||||||
|
|
||||||
if ($request->get('remove_current_image') == '1') {
|
if ($request->get('remove_current_image') == '1') {
|
||||||
$organiser->logo_path = '';
|
$organiser->logo_path = '';
|
||||||
|
|
@ -56,9 +56,9 @@ class OrganiserCustomizeController extends MyBaseController
|
||||||
|
|
||||||
if ($request->hasFile('organiser_logo')) {
|
if ($request->hasFile('organiser_logo')) {
|
||||||
$the_file = \File::get($request->file('organiser_logo')->getRealPath());
|
$the_file = \File::get($request->file('organiser_logo')->getRealPath());
|
||||||
$file_name = str_slug($organiser->name).'-logo-'.$organiser->id.'.'.strtolower($request->file('organiser_logo')->getClientOriginalExtension());
|
$file_name = str_slug($organiser->name) . '-logo-' . $organiser->id . '.' . strtolower($request->file('organiser_logo')->getClientOriginalExtension());
|
||||||
|
|
||||||
$relative_path_to_file = config('attendize.organiser_images_path').'/'.$file_name;
|
$relative_path_to_file = config('attendize.organiser_images_path') . '/' . $file_name;
|
||||||
$full_path_to_file = public_path($relative_path_to_file);
|
$full_path_to_file = public_path($relative_path_to_file);
|
||||||
|
|
||||||
$img = Image::make($the_file);
|
$img = Image::make($the_file);
|
||||||
|
|
@ -110,14 +110,14 @@ class OrganiserCustomizeController extends MyBaseController
|
||||||
|
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'error',
|
'status' => 'error',
|
||||||
'messages' => $validator->messages()->toArray(),
|
'messages' => $validator->messages()->toArray(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$event->page_bg_color = $request->get('page_bg_color');
|
$event->page_bg_color = $request->get('page_bg_color');
|
||||||
$event->page_header_bg_color = $request->get('page_header_bg_color');
|
$event->page_header_bg_color = $request->get('page_header_bg_color');
|
||||||
$event->page_text_color = $request->get('page_text_color');
|
$event->page_text_color = $request->get('page_text_color');
|
||||||
|
|
||||||
$event->save();
|
$event->save();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ class OrganiserEventsController extends MyBaseController
|
||||||
$sort_by = (in_array($request->get('sort_by'), $allowed_sorts) ? $request->get('sort_by') : 'start_date');
|
$sort_by = (in_array($request->get('sort_by'), $allowed_sorts) ? $request->get('sort_by') : 'start_date');
|
||||||
|
|
||||||
$events = $searchQuery
|
$events = $searchQuery
|
||||||
? Event::scope()->where('title', 'like', '%'.$searchQuery.'%')->orderBy($sort_by, 'desc')->where('organiser_id', '=', $organiser_id)->paginate(12)
|
? Event::scope()->where('title', 'like', '%' . $searchQuery . '%')->orderBy($sort_by,
|
||||||
|
'desc')->where('organiser_id', '=', $organiser_id)->paginate(12)
|
||||||
: Event::scope()->where('organiser_id', '=', $organiser_id)->orderBy($sort_by, 'desc')->paginate(12);
|
: Event::scope()->where('organiser_id', '=', $organiser_id)->orderBy($sort_by, 'desc')->paginate(12);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Attendize\Utils;
|
use App\Attendize\Utils;
|
||||||
use App\Models\Organiser;
|
use App\Models\Organiser;
|
||||||
use Carbon\Carbon;
|
|
||||||
use Auth;
|
use Auth;
|
||||||
|
use Carbon\Carbon;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class OrganiserViewController extends Controller
|
class OrganiserViewController extends Controller
|
||||||
|
|
@ -22,14 +22,14 @@ class OrganiserViewController extends Controller
|
||||||
{
|
{
|
||||||
$organiser = Organiser::findOrFail($organiser_id);
|
$organiser = Organiser::findOrFail($organiser_id);
|
||||||
|
|
||||||
if(!$organiser->enable_organiser_page && !Utils::userOwns($organiser)) {
|
if (!$organiser->enable_organiser_page && !Utils::userOwns($organiser)) {
|
||||||
abort(404);
|
abort(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we are previewing styles from the backend we set them here.
|
* If we are previewing styles from the backend we set them here.
|
||||||
*/
|
*/
|
||||||
if($request->get('preview_styles') && Auth::check()) {
|
if ($request->get('preview_styles') && Auth::check()) {
|
||||||
$query_string = rawurldecode($request->get('preview_styles'));
|
$query_string = rawurldecode($request->get('preview_styles'));
|
||||||
parse_str($query_string, $preview_styles);
|
parse_str($query_string, $preview_styles);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,8 +121,8 @@ class RemindersController extends Controller
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return redirect()->back()
|
return redirect()->back()
|
||||||
->withInput($request->only('email'))
|
->withInput($request->only('email'))
|
||||||
->withErrors(['email' => trans($response)]);
|
->withErrors(['email' => trans($response)]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,8 @@
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Auth;
|
use Auth;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Input;
|
|
||||||
use Hash;
|
use Hash;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
use Validator;
|
use Validator;
|
||||||
|
|
||||||
class UserController extends Controller
|
class UserController extends Controller
|
||||||
|
|
@ -33,7 +32,11 @@ class UserController extends Controller
|
||||||
public function postEditUser(Request $request)
|
public function postEditUser(Request $request)
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'email' => ['required', 'email', 'unique:users,email,' . Auth::user()->id . ',id,account_id,' . Auth::user()->account_id],
|
'email' => [
|
||||||
|
'required',
|
||||||
|
'email',
|
||||||
|
'unique:users,email,' . Auth::user()->id . ',id,account_id,' . Auth::user()->account_id
|
||||||
|
],
|
||||||
'new_password' => ['min:5', 'confirmed', 'required_with:password'],
|
'new_password' => ['min:5', 'confirmed', 'required_with:password'],
|
||||||
'password' => 'passcheck',
|
'password' => 'passcheck',
|
||||||
'first_name' => ['required'],
|
'first_name' => ['required'],
|
||||||
|
|
@ -65,8 +68,8 @@ class UserController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->first_name = $request->get('first_name');
|
$user->first_name = $request->get('first_name');
|
||||||
$user->last_name = $request->get('last_name');
|
$user->last_name = $request->get('last_name');
|
||||||
$user->email = $request->get('email');
|
$user->email = $request->get('email');
|
||||||
|
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,8 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Auth;
|
|
||||||
use Illuminate\Contracts\Auth\Guard;
|
use Illuminate\Contracts\Auth\Guard;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Input;
|
|
||||||
use Redirect;
|
use Redirect;
|
||||||
use View;
|
use View;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ namespace App\Http\Controllers;
|
||||||
use App\Attendize\Utils;
|
use App\Attendize\Utils;
|
||||||
use App\Models\Account;
|
use App\Models\Account;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use Hash;
|
||||||
use Illuminate\Contracts\Auth\Guard;
|
use Illuminate\Contracts\Auth\Guard;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Mail;
|
use Mail;
|
||||||
use Hash;
|
|
||||||
|
|
||||||
class UserSignupController extends Controller
|
class UserSignupController extends Controller
|
||||||
{
|
{
|
||||||
|
|
@ -62,10 +62,12 @@ class UserSignupController extends Controller
|
||||||
|
|
||||||
if ($is_attendize) {
|
if ($is_attendize) {
|
||||||
// TODO: Do this async?
|
// TODO: Do this async?
|
||||||
Mail::send('Emails.ConfirmEmail', ['first_name' => $user->first_name, 'confirmation_code' => $user->confirmation_code], function ($message) use ($request) {
|
Mail::send('Emails.ConfirmEmail',
|
||||||
$message->to($request->get('email'), $request->get('first_name'))
|
['first_name' => $user->first_name, 'confirmation_code' => $user->confirmation_code],
|
||||||
->subject('Thank you for registering for Attendize');
|
function ($message) use ($request) {
|
||||||
});
|
$message->to($request->get('email'), $request->get('first_name'))
|
||||||
|
->subject('Thank you for registering for Attendize');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
session()->flash('message', 'Success! You can now login.');
|
session()->flash('message', 'Success! You can now login.');
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
namespace App\Http;
|
namespace App\Http;
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||||
|
|
||||||
class Kernel extends HttpKernel
|
class Kernel extends HttpKernel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
@ -43,11 +45,11 @@ class Kernel extends HttpKernel
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $routeMiddleware = [
|
protected $routeMiddleware = [
|
||||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||||
'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class,
|
'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class,
|
||||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||||
'first.run' => \App\Http\Middleware\FirstRunMiddleware::class,
|
'first.run' => \App\Http\Middleware\FirstRunMiddleware::class,
|
||||||
'installed' => \App\Http\Middleware\CheckInstalled::class,
|
'installed' => \App\Http\Middleware\CheckInstalled::class,
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ class Authenticate
|
||||||
/**
|
/**
|
||||||
* Handle an incoming request.
|
* Handle an incoming request.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Closure $next
|
* @param \Closure $next
|
||||||
* @param string|null $guard
|
* @param string|null $guard
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next, $guard = null)
|
public function handle($request, Closure $next, $guard = null)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ use App\Attendize\Utils;
|
||||||
use App\Models\Account;
|
use App\Models\Account;
|
||||||
use Closure;
|
use Closure;
|
||||||
use Redirect;
|
use Redirect;
|
||||||
use Request;
|
|
||||||
|
|
||||||
class CheckInstalled
|
class CheckInstalled
|
||||||
{
|
{
|
||||||
|
|
@ -14,7 +13,7 @@ class CheckInstalled
|
||||||
* Handle an incoming request.
|
* Handle an incoming request.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Closure $next
|
* @param \Closure $next
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
|
@ -30,7 +29,7 @@ class CheckInstalled
|
||||||
/*
|
/*
|
||||||
* Redirect user to signup page if there are no accounts
|
* Redirect user to signup page if there are no accounts
|
||||||
*/
|
*/
|
||||||
if(Account::count() === 0 && !$request->is('signup*')) {
|
if (Account::count() === 0 && !$request->is('signup*')) {
|
||||||
return redirect()->to('signup');
|
return redirect()->to('signup');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,6 @@ namespace app\Http\Middleware;
|
||||||
|
|
||||||
use App\Models\Organiser;
|
use App\Models\Organiser;
|
||||||
use Closure;
|
use Closure;
|
||||||
use Redirect;
|
|
||||||
use Request;
|
|
||||||
use DB;
|
|
||||||
|
|
||||||
class FirstRunMiddleware
|
class FirstRunMiddleware
|
||||||
{
|
{
|
||||||
|
|
@ -14,7 +11,7 @@ class FirstRunMiddleware
|
||||||
* Handle an incoming request.
|
* Handle an incoming request.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Closure $next
|
* @param \Closure $next
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ class GeneralChecks
|
||||||
* Handle an incoming request.
|
* Handle an incoming request.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Closure $next
|
* @param \Closure $next
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
|
@ -21,7 +21,7 @@ class GeneralChecks
|
||||||
if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/(?i)msie [2-8]/', $_SERVER['HTTP_USER_AGENT'])) {
|
if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/(?i)msie [2-8]/', $_SERVER['HTTP_USER_AGENT'])) {
|
||||||
session()->flash('message', 'Please update your browser. This application requires a modern browser.');
|
session()->flash('message', 'Please update your browser. This application requires a modern browser.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = $next($request);
|
$response = $next($request);
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class RedirectIfAuthenticated
|
||||||
* Handle an incoming request.
|
* Handle an incoming request.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Closure $next
|
* @param \Closure $next
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,14 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
|
||||||
class VerifyCsrfToken extends BaseVerifier
|
class VerifyCsrfToken extends BaseVerifier
|
||||||
{
|
{
|
||||||
protected $except = [
|
protected $except = [
|
||||||
'install/*',
|
'install/*',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle an incoming request.
|
* Handle an incoming request.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Closure $next
|
* @param \Closure $next
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
namespace App\Http\Requests;
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
use App\Http\Requests\Request;
|
|
||||||
|
|
||||||
class StoreEventQuestionRequest extends Request
|
class StoreEventQuestionRequest extends Request
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
@ -24,7 +22,7 @@ class StoreEventQuestionRequest extends Request
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'title' => 'required',
|
'title' => 'required',
|
||||||
'option' => 'array',
|
'option' => 'array',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$api = app('Dingo\Api\Routing\Router');
|
||||||
|
|
||||||
|
$api->version('v1', function ($api) {
|
||||||
|
|
||||||
|
$api->get('events', function () {
|
||||||
|
return \App\Models\Event::all();
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
Route::group(['prefix' => 'api', 'middleware' => 'auth:api'], function () {
|
Route::group(['prefix' => 'api', 'middleware' => 'auth:api'], function () {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -44,7 +54,6 @@ Route::group(['prefix' => 'api', 'middleware' => 'auth:api'], function () {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'Hello' => Auth::guard('api')->user()->full_name . '!'
|
'Hello' => Auth::guard('api')->user()->full_name . '!'
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,10 @@
|
||||||
|
|
||||||
namespace App\Jobs;
|
namespace App\Jobs;
|
||||||
|
|
||||||
use App\Jobs\Job;
|
|
||||||
use App\Models\Order;
|
use App\Models\Order;
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
use Log;
|
use Log;
|
||||||
use PDF;
|
use PDF;
|
||||||
|
|
||||||
|
|
@ -25,11 +24,11 @@ class GenerateTicket extends Job implements ShouldQueue
|
||||||
*/
|
*/
|
||||||
public function __construct($reference)
|
public function __construct($reference)
|
||||||
{
|
{
|
||||||
Log::info("Generating ticket: #".$reference);
|
Log::info("Generating ticket: #" . $reference);
|
||||||
$this->reference = $reference;
|
$this->reference = $reference;
|
||||||
$this->order_reference = explode("-", $reference)[0];
|
$this->order_reference = explode("-", $reference)[0];
|
||||||
if (strpos($reference, "-")) {
|
if (strpos($reference, "-")) {
|
||||||
$this->attendee_reference_index = explode("-", $reference)[1];
|
$this->attendee_reference_index = explode("-", $reference)[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -41,45 +40,46 @@ class GenerateTicket extends Job implements ShouldQueue
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
|
||||||
$file_name = $this->reference;
|
$file_name = $this->reference;
|
||||||
$file_path = public_path(config('attendize.event_pdf_tickets_path')).'/'.$file_name;
|
$file_path = public_path(config('attendize.event_pdf_tickets_path')) . '/' . $file_name;
|
||||||
$file_with_ext = $file_path.".pdf";
|
$file_with_ext = $file_path . ".pdf";
|
||||||
|
|
||||||
if (file_exists($file_with_ext)) {
|
if (file_exists($file_with_ext)) {
|
||||||
Log::info("Use ticket from cache: ".$file_with_ext);
|
Log::info("Use ticket from cache: " . $file_with_ext);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$order = Order::where('order_reference', $this->order_reference)->first();
|
$order = Order::where('order_reference', $this->order_reference)->first();
|
||||||
Log::info($order);
|
Log::info($order);
|
||||||
$event = $order->event;
|
$event = $order->event;
|
||||||
|
|
||||||
$query = $order->attendees();
|
$query = $order->attendees();
|
||||||
if ($this->isAttendeeTicket()) {
|
if ($this->isAttendeeTicket()) {
|
||||||
$query = $query->where('reference_index', '=', $this->attendee_reference_index);
|
$query = $query->where('reference_index', '=', $this->attendee_reference_index);
|
||||||
}
|
}
|
||||||
$attendees = $query->get();
|
$attendees = $query->get();
|
||||||
|
|
||||||
$image_path = $event->organiser->full_logo_path;
|
$image_path = $event->organiser->full_logo_path;
|
||||||
if ($event->images->first() != null) {
|
if ($event->images->first() != null) {
|
||||||
$image_path = $event->images()->first()->image_path;
|
$image_path = $event->images()->first()->image_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'order' => $order,
|
'order' => $order,
|
||||||
'event' => $event,
|
'event' => $event,
|
||||||
'attendees' => $attendees,
|
'attendees' => $attendees,
|
||||||
'css' => file_get_contents(public_path('assets/stylesheet/ticket.css')),
|
'css' => file_get_contents(public_path('assets/stylesheet/ticket.css')),
|
||||||
'image' => base64_encode(file_get_contents(public_path($image_path))),
|
'image' => base64_encode(file_get_contents(public_path($image_path))),
|
||||||
];
|
];
|
||||||
|
|
||||||
PDF::setOutputMode('F'); // force to file
|
PDF::setOutputMode('F'); // force to file
|
||||||
PDF::html('Public.ViewEvent.Partials.PDFTicket', $data, $file_path);
|
PDF::html('Public.ViewEvent.Partials.PDFTicket', $data, $file_path);
|
||||||
|
|
||||||
Log::info("Ticket generated!");
|
Log::info("Ticket generated!");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function isAttendeeTicket() {
|
private function isAttendeeTicket()
|
||||||
return ($this->attendee_reference_index != null);
|
{
|
||||||
|
return ($this->attendee_reference_index != null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,15 @@ use Illuminate\Bus\Queueable;
|
||||||
|
|
||||||
abstract class Job
|
abstract class Job
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Queueable Jobs
|
| Queueable Jobs
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This job base class provides a central location to place any logic that
|
| This job base class provides a central location to place any logic that
|
||||||
| is shared across all of your jobs. The trait included with the class
|
| is shared across all of your jobs. The trait included with the class
|
||||||
| provides access to the "onQueue" and "delay" queue helper methods.
|
| provides access to the "onQueue" and "delay" queue helper methods.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
use Queueable;
|
use Queueable;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,12 @@
|
||||||
|
|
||||||
namespace App\Jobs;
|
namespace App\Jobs;
|
||||||
|
|
||||||
use App\Jobs\Job;
|
|
||||||
use App\Mailers\AttendeeMailer;
|
use App\Mailers\AttendeeMailer;
|
||||||
use App\Models\Attendee;
|
use App\Models\Attendee;
|
||||||
use App\Jobs\GenerateTicket;
|
|
||||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
class SendAttendeeInvite extends Job implements ShouldQueue
|
class SendAttendeeInvite extends Job implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,19 @@
|
||||||
|
|
||||||
namespace App\Jobs;
|
namespace App\Jobs;
|
||||||
|
|
||||||
use App\Jobs\Job;
|
|
||||||
use App\Mailers\AttendeeMailer;
|
use App\Mailers\AttendeeMailer;
|
||||||
use App\Models\Attendee;
|
use App\Models\Attendee;
|
||||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
class SendAttendeeTicket extends Job implements ShouldQueue
|
class SendAttendeeTicket extends Job implements ShouldQueue
|
||||||
{
|
{
|
||||||
use InteractsWithQueue, SerializesModels, DispatchesJobs;
|
use InteractsWithQueue, SerializesModels, DispatchesJobs;
|
||||||
|
|
||||||
public $attendee;
|
public $attendee;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,9 @@
|
||||||
|
|
||||||
namespace App\Jobs;
|
namespace App\Jobs;
|
||||||
|
|
||||||
use App\Jobs\Job;
|
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
class SendMessageToAttendee extends Job implements ShouldQueue
|
class SendMessageToAttendee extends Job implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,20 +2,18 @@
|
||||||
|
|
||||||
namespace App\Jobs;
|
namespace App\Jobs;
|
||||||
|
|
||||||
use App\Jobs\Job;
|
|
||||||
use App\Mailers\AttendeeMailer;
|
use App\Mailers\AttendeeMailer;
|
||||||
use App\Models\Message;
|
use App\Models\Message;
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
use Log;
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
class SendMessageToAttendees extends Job implements ShouldQueue
|
class SendMessageToAttendees extends Job implements ShouldQueue
|
||||||
{
|
{
|
||||||
use InteractsWithQueue, SerializesModels;
|
use InteractsWithQueue, SerializesModels;
|
||||||
|
|
||||||
public $attendeeMessage;
|
public $attendeeMessage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,11 @@
|
||||||
|
|
||||||
namespace App\Jobs;
|
namespace App\Jobs;
|
||||||
|
|
||||||
use App\Jobs\Job;
|
|
||||||
use App\Mailers\OrderMailer;
|
use App\Mailers\OrderMailer;
|
||||||
use App\Models\Order;
|
use App\Models\Order;
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
class SendOrderNotification extends Job implements ShouldQueue
|
class SendOrderNotification extends Job implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,12 @@
|
||||||
|
|
||||||
namespace App\Jobs;
|
namespace App\Jobs;
|
||||||
|
|
||||||
use App\Jobs\Job;
|
|
||||||
use App\Mailers\OrderMailer;
|
use App\Mailers\OrderMailer;
|
||||||
use App\Models\Order;
|
use App\Models\Order;
|
||||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
class SendOrderTickets extends Job implements ShouldQueue
|
class SendOrderTickets extends Job implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,8 @@ use App\Events\OrderCompletedEvent;
|
||||||
use App\Jobs\GenerateTicket;
|
use App\Jobs\GenerateTicket;
|
||||||
use App\Jobs\SendOrderNotification;
|
use App\Jobs\SendOrderNotification;
|
||||||
use App\Jobs\SendOrderTickets;
|
use App\Jobs\SendOrderTickets;
|
||||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
class OrderCompletedListener implements ShouldQueue
|
class OrderCompletedListener implements ShouldQueue
|
||||||
|
|
@ -29,7 +28,7 @@ class OrderCompletedListener implements ShouldQueue
|
||||||
/**
|
/**
|
||||||
* Handle the event.
|
* Handle the event.
|
||||||
*
|
*
|
||||||
* @param OrderCompletedEvent $event
|
* @param OrderCompletedEvent $event
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function handle(OrderCompletedEvent $event)
|
public function handle(OrderCompletedEvent $event)
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,9 @@ namespace App\Mailers;
|
||||||
|
|
||||||
use App\Models\Attendee;
|
use App\Models\Attendee;
|
||||||
use App\Models\Message;
|
use App\Models\Message;
|
||||||
use App\Models\Order;
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Mail;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
use Mail;
|
||||||
|
|
||||||
|
|
||||||
class AttendeeMailer extends Mailer
|
class AttendeeMailer extends Mailer
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use App\Models\Order;
|
||||||
use Log;
|
use Log;
|
||||||
use Mail;
|
use Mail;
|
||||||
|
|
||||||
class OrderMailer
|
class OrderMailer
|
||||||
{
|
{
|
||||||
public function sendOrderNotification(Order $order)
|
public function sendOrderNotification(Order $order)
|
||||||
{
|
{
|
||||||
|
|
@ -14,27 +14,28 @@ class OrderMailer
|
||||||
'order' => $order
|
'order' => $order
|
||||||
];
|
];
|
||||||
|
|
||||||
Mail::send('Emails.OrderNotification', $data, function($message) use ($order) {
|
Mail::send('Emails.OrderNotification', $data, function ($message) use ($order) {
|
||||||
$message->to($order->account->email);
|
$message->to($order->account->email);
|
||||||
$message->subject('New order received on the event '.$order->event->title.' ['.$order->order_reference.']');
|
$message->subject('New order received on the event ' . $order->event->title . ' [' . $order->order_reference . ']');
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sendOrderTickets($order) {
|
public function sendOrderTickets($order)
|
||||||
|
{
|
||||||
|
|
||||||
Log::info("Sending ticket to: ".$order->email);
|
Log::info("Sending ticket to: " . $order->email);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'order' => $order,
|
'order' => $order,
|
||||||
];
|
];
|
||||||
|
|
||||||
Mail::send('Mailers.TicketMailer.SendOrderTickets', $data, function($message) use ($order) {
|
Mail::send('Mailers.TicketMailer.SendOrderTickets', $data, function ($message) use ($order) {
|
||||||
$message->to($order->email);
|
$message->to($order->email);
|
||||||
$message->subject('Your tickets for the event '.$order->event->title);
|
$message->subject('Your tickets for the event ' . $order->event->title);
|
||||||
|
|
||||||
$file_name = $order->order_reference;
|
$file_name = $order->order_reference;
|
||||||
$file_path = public_path(config('attendize.event_pdf_tickets_path')).'/'.$file_name.'.pdf';
|
$file_path = public_path(config('attendize.event_pdf_tickets_path')) . '/' . $file_name . '.pdf';
|
||||||
|
|
||||||
$message->attach($file_path);
|
$message->attach($file_path);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,17 @@ namespace App\Models;
|
||||||
|
|
||||||
use App\Attendize\Utils;
|
use App\Attendize\Utils;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use DB;
|
|
||||||
|
|
||||||
class Account extends MyBaseModel
|
class Account extends MyBaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that should be mutated to dates.
|
||||||
|
*
|
||||||
|
* @var array $dates
|
||||||
|
*/
|
||||||
|
public $dates = ['deleted_at'];
|
||||||
/**
|
/**
|
||||||
* The validation rules
|
* The validation rules
|
||||||
*
|
*
|
||||||
|
|
@ -20,14 +25,6 @@ class Account extends MyBaseModel
|
||||||
'last_name' => ['required'],
|
'last_name' => ['required'],
|
||||||
'email' => ['required', 'email'],
|
'email' => ['required', 'email'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* The attributes that should be mutated to dates.
|
|
||||||
*
|
|
||||||
* @var array $dates
|
|
||||||
*/
|
|
||||||
public $dates = ['deleted_at'];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The validation error messages.
|
* The validation error messages.
|
||||||
*
|
*
|
||||||
|
|
@ -98,6 +95,16 @@ class Account extends MyBaseModel
|
||||||
return $this->belongsTo('\App\Models\Currency');
|
return $this->belongsTo('\App\Models\Currency');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alias for $this->account_payment_gateways()
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||||
|
*/
|
||||||
|
public function gateways()
|
||||||
|
{
|
||||||
|
return $this->account_payment_gateways();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Payment gateways associated with an account
|
* Payment gateways associated with an account
|
||||||
*
|
*
|
||||||
|
|
@ -108,15 +115,6 @@ class Account extends MyBaseModel
|
||||||
return $this->hasMany('\App\Models\AccountPaymentGateway');
|
return $this->hasMany('\App\Models\AccountPaymentGateway');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Alias for $this->account_payment_gateways()
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
||||||
*/
|
|
||||||
public function gateways() {
|
|
||||||
return $this->account_payment_gateways();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get an accounts active payment gateway
|
* Get an accounts active payment gateway
|
||||||
*
|
*
|
||||||
|
|
@ -124,18 +122,8 @@ class Account extends MyBaseModel
|
||||||
*/
|
*/
|
||||||
public function active_payment_gateway()
|
public function active_payment_gateway()
|
||||||
{
|
{
|
||||||
return $this->hasOne('\App\Models\AccountPaymentGateway', 'payment_gateway_id', 'payment_gateway_id')->where('account_id', $this->id);
|
return $this->hasOne('\App\Models\AccountPaymentGateway', 'payment_gateway_id',
|
||||||
}
|
'payment_gateway_id')->where('account_id', $this->id);
|
||||||
|
|
||||||
/**
|
|
||||||
* Get an accounts gateways
|
|
||||||
*
|
|
||||||
* @param $gateway_id
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function getGateway($gateway_id)
|
|
||||||
{
|
|
||||||
return $this->gateways->where('payment_gateway_id', $gateway_id)->first();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -149,14 +137,23 @@ class Account extends MyBaseModel
|
||||||
{
|
{
|
||||||
$gateway = $this->getGateway($gateway_id);
|
$gateway = $this->getGateway($gateway_id);
|
||||||
|
|
||||||
if($gateway && is_array($gateway->config)) {
|
if ($gateway && is_array($gateway->config)) {
|
||||||
return isset($gateway->config[$key]) ? $gateway->config[$key] : false;
|
return isset($gateway->config[$key]) ? $gateway->config[$key] : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get an accounts gateways
|
||||||
|
*
|
||||||
|
* @param $gateway_id
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getGateway($gateway_id)
|
||||||
|
{
|
||||||
|
return $this->gateways->where('payment_gateway_id', $gateway_id)->first();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the stripe api key.
|
* Get the stripe api key.
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ class AccountPaymentGateway extends MyBaseModel
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
*/
|
*/
|
||||||
public function account() {
|
public function account()
|
||||||
|
{
|
||||||
return $this->belongsTo('\App\Models\Account');
|
return $this->belongsTo('\App\Models\Account');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -43,11 +44,13 @@ class AccountPaymentGateway extends MyBaseModel
|
||||||
* @param $val
|
* @param $val
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function getConfigAttribute($value) {
|
public function getConfigAttribute($value)
|
||||||
|
{
|
||||||
return json_decode($value, true);
|
return json_decode($value, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setConfigAttribute($value) {
|
public function setConfigAttribute($value)
|
||||||
|
{
|
||||||
$this->attributes['config'] = json_encode($value);
|
$this->attributes['config'] = json_encode($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of Activity.
|
* Description of Activity.
|
||||||
|
|
|
||||||
|
|
@ -36,18 +36,18 @@ class Attendee extends MyBaseModel
|
||||||
'arrival_time'
|
'arrival_time'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a private reference number for the attendee. Use for checking in the attendee.
|
* Generate a private reference number for the attendee. Use for checking in the attendee.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function boot()
|
public static function boot()
|
||||||
{
|
{
|
||||||
parent::boot();
|
parent::boot();
|
||||||
|
|
||||||
static::creating(function ($order) {
|
static::creating(function ($order) {
|
||||||
$order->private_reference_number = str_pad(rand(0, pow(10, 9) - 1), 9, '0', STR_PAD_LEFT);
|
$order->private_reference_number = str_pad(rand(0, pow(10, 9) - 1), 9, '0', STR_PAD_LEFT);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The order associated with the attendee.
|
* The order associated with the attendee.
|
||||||
|
|
@ -78,7 +78,7 @@ class Attendee extends MyBaseModel
|
||||||
{
|
{
|
||||||
return $this->belongsTo('\App\Models\Event');
|
return $this->belongsTo('\App\Models\Event');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||||
*/
|
*/
|
||||||
|
|
@ -105,7 +105,8 @@ class Attendee extends MyBaseModel
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getReferenceAttribute() {
|
public function getReferenceAttribute()
|
||||||
|
{
|
||||||
return $this->order->order_reference . '-' . $this->reference_index;
|
return $this->order->order_reference . '-' . $this->reference_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -116,11 +117,10 @@ class Attendee extends MyBaseModel
|
||||||
*/
|
*/
|
||||||
public function getFullNameAttribute()
|
public function getFullNameAttribute()
|
||||||
{
|
{
|
||||||
return $this->first_name.' '.$this->last_name;
|
return $this->first_name . ' ' . $this->last_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that should be mutated to dates.
|
* The attributes that should be mutated to dates.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of Currency.
|
* Description of Currency.
|
||||||
|
|
@ -13,20 +13,18 @@ namespace App\Models;
|
||||||
*/
|
*/
|
||||||
class Currency extends \Illuminate\Database\Eloquent\Model
|
class Currency extends \Illuminate\Database\Eloquent\Model
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* The database table used by the model.
|
|
||||||
*
|
|
||||||
* @var string $table
|
|
||||||
*/
|
|
||||||
protected $table = 'currencies';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether the model should be timestamped.
|
* Indicates whether the model should be timestamped.
|
||||||
*
|
*
|
||||||
* @var bool $timestamps
|
* @var bool $timestamps
|
||||||
*/
|
*/
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
/**
|
||||||
|
* The database table used by the model.
|
||||||
|
*
|
||||||
|
* @var string $table
|
||||||
|
*/
|
||||||
|
protected $table = 'currencies';
|
||||||
/**
|
/**
|
||||||
* Indicates whether the model should use soft deletes.
|
* Indicates whether the model should use soft deletes.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of DateFormat.
|
* Description of DateFormat.
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of DateTimeFormat.
|
* Description of DateTimeFormat.
|
||||||
|
|
@ -13,20 +13,18 @@ namespace App\Models;
|
||||||
*/
|
*/
|
||||||
class DateTimeFormat extends \Illuminate\Database\Eloquent\Model
|
class DateTimeFormat extends \Illuminate\Database\Eloquent\Model
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* The database table used by the model.
|
|
||||||
*
|
|
||||||
* @var string $table
|
|
||||||
*/
|
|
||||||
protected $table = 'datetime_formats';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether the model should be timestamped.
|
* Indicates whether the model should be timestamped.
|
||||||
*
|
*
|
||||||
* @var bool $timestamps
|
* @var bool $timestamps
|
||||||
*/
|
*/
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
/**
|
||||||
|
* The database table used by the model.
|
||||||
|
*
|
||||||
|
* @var string $table
|
||||||
|
*/
|
||||||
|
protected $table = 'datetime_formats';
|
||||||
/**
|
/**
|
||||||
* Indicates whether the model should use soft deletes.
|
* Indicates whether the model should use soft deletes.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of DiscountCode.
|
* Description of DiscountCode.
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of EventImage.
|
* Description of EventImage.
|
||||||
|
|
|
||||||
|
|
@ -7,21 +7,21 @@ use DB;
|
||||||
|
|
||||||
class EventStats extends \Illuminate\Database\Eloquent\Model
|
class EventStats extends \Illuminate\Database\Eloquent\Model
|
||||||
{
|
{
|
||||||
|
public static $unguarded = true;
|
||||||
/**
|
/**
|
||||||
* Indicates if the model should be timestamped.
|
* Indicates if the model should be timestamped.
|
||||||
*
|
*
|
||||||
* @var bool $timestamps
|
* @var bool $timestamps
|
||||||
*/
|
*/
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
public static $unguarded = true;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo This shouldn't be in a view.
|
* @todo This shouldn't be in a view.
|
||||||
* Update the amount of revenue a ticket has earned.
|
* Update the amount of revenue a ticket has earned.
|
||||||
*
|
*
|
||||||
* @param int $ticket_id
|
* @param int $ticket_id
|
||||||
* @param float $amount
|
* @param float $amount
|
||||||
* @param bool $deduct
|
* @param bool $deduct
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
|
@ -37,7 +37,7 @@ class EventStats extends \Illuminate\Database\Eloquent\Model
|
||||||
|
|
||||||
return $ticket->save();
|
return $ticket->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the amount of views a ticket has earned.
|
* Update the amount of views a ticket has earned.
|
||||||
|
|
@ -53,7 +53,7 @@ class EventStats extends \Illuminate\Database\Eloquent\Model
|
||||||
'date' => DB::raw('CURRENT_DATE'),
|
'date' => DB::raw('CURRENT_DATE'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$cookie_name = 'visitTrack_'.$event_id.'_'.date('dmy');
|
$cookie_name = 'visitTrack_' . $event_id . '_' . date('dmy');
|
||||||
|
|
||||||
if (!Cookie::get($cookie_name)) {
|
if (!Cookie::get($cookie_name)) {
|
||||||
Cookie::queue($cookie_name, true, 60 * 24 * 14);
|
Cookie::queue($cookie_name, true, 60 * 24 * 14);
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of Message.
|
* Description of Message.
|
||||||
|
|
@ -47,7 +47,7 @@ class Message extends MyBaseModel
|
||||||
|
|
||||||
$ticket = Ticket::scope()->find($this->recipients);
|
$ticket = Ticket::scope()->find($this->recipients);
|
||||||
|
|
||||||
return 'Ticket: '.$ticket->title;
|
return 'Ticket: ' . $ticket->title;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -11,20 +11,18 @@ use Validator;
|
||||||
|
|
||||||
class MyBaseModel extends \Illuminate\Database\Eloquent\Model
|
class MyBaseModel extends \Illuminate\Database\Eloquent\Model
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Indicates whether the model uses soft deletes.
|
|
||||||
*
|
|
||||||
* @var bool $softDelete
|
|
||||||
*/
|
|
||||||
protected $softDelete = true;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if the model should be timestamped.
|
* Indicates if the model should be timestamped.
|
||||||
*
|
*
|
||||||
* @var bool $timestamps
|
* @var bool $timestamps
|
||||||
*/
|
*/
|
||||||
public $timestamps = true;
|
public $timestamps = true;
|
||||||
|
/**
|
||||||
|
* Indicates whether the model uses soft deletes.
|
||||||
|
*
|
||||||
|
* @var bool $softDelete
|
||||||
|
*/
|
||||||
|
protected $softDelete = true;
|
||||||
/**
|
/**
|
||||||
* The validation rules of the model.
|
* The validation rules of the model.
|
||||||
*
|
*
|
||||||
|
|
@ -46,6 +44,39 @@ class MyBaseModel extends \Illuminate\Database\Eloquent\Model
|
||||||
*/
|
*/
|
||||||
protected $errors;
|
protected $errors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new model.
|
||||||
|
*
|
||||||
|
* @param int $account_id
|
||||||
|
* @param int $user_id
|
||||||
|
* @param bool $ignore_user_id
|
||||||
|
*
|
||||||
|
* @return \className
|
||||||
|
*/
|
||||||
|
public static function createNew($account_id = false, $user_id = false, $ignore_user_id = false)
|
||||||
|
{
|
||||||
|
$className = get_called_class();
|
||||||
|
$entity = new $className();
|
||||||
|
|
||||||
|
if (Auth::check()) {
|
||||||
|
if (!$ignore_user_id) {
|
||||||
|
$entity->user_id = Auth::user()->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$entity->account_id = Auth::user()->account_id;
|
||||||
|
} elseif ($account_id || $user_id) {
|
||||||
|
if ($user_id && !$ignore_user_id) {
|
||||||
|
$entity->user_id = $user_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$entity->account_id = $account_id;
|
||||||
|
} else {
|
||||||
|
App::abort(500);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $entity;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate the model instance.
|
* Validate the model instance.
|
||||||
*
|
*
|
||||||
|
|
@ -79,39 +110,6 @@ class MyBaseModel extends \Illuminate\Database\Eloquent\Model
|
||||||
return $returnArray ? $this->errors->toArray() : $this->errors;
|
return $returnArray ? $this->errors->toArray() : $this->errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new model.
|
|
||||||
*
|
|
||||||
* @param int $account_id
|
|
||||||
* @param int $user_id
|
|
||||||
* @param bool $ignore_user_id
|
|
||||||
*
|
|
||||||
* @return \className
|
|
||||||
*/
|
|
||||||
public static function createNew($account_id = false, $user_id = false, $ignore_user_id = false)
|
|
||||||
{
|
|
||||||
$className = get_called_class();
|
|
||||||
$entity = new $className();
|
|
||||||
|
|
||||||
if (Auth::check()) {
|
|
||||||
if (!$ignore_user_id) {
|
|
||||||
$entity->user_id = Auth::user()->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
$entity->account_id = Auth::user()->account_id;
|
|
||||||
} elseif ($account_id || $user_id) {
|
|
||||||
if ($user_id && !$ignore_user_id) {
|
|
||||||
$entity->user_id = $user_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
$entity->account_id = $account_id;
|
|
||||||
} else {
|
|
||||||
App::abort(500);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $entity;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a formatted date.
|
* Get a formatted date.
|
||||||
*
|
*
|
||||||
|
|
@ -150,7 +148,7 @@ class MyBaseModel extends \Illuminate\Database\Eloquent\Model
|
||||||
$table = $this->getTable();
|
$table = $this->getTable();
|
||||||
|
|
||||||
$query->where(function ($query) use ($accountId, $table) {
|
$query->where(function ($query) use ($accountId, $table) {
|
||||||
$query->whereRaw(\DB::raw('('.$table.'.account_id = '.$accountId.')'));
|
$query->whereRaw(\DB::raw('(' . $table . '.account_id = ' . $accountId . ')'));
|
||||||
});
|
});
|
||||||
|
|
||||||
return $query;
|
return $query;
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of OrderItems.
|
* Description of OrderItems.
|
||||||
|
|
@ -15,7 +15,6 @@ class OrderItem extends MyBaseModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Indicates if the model should be timestamped.
|
* Indicates if the model should be timestamped.
|
||||||
|
|
||||||
*
|
*
|
||||||
* @var bool $timestamps
|
* @var bool $timestamps
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of OrderStatus.
|
* Description of OrderStatus.
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,8 @@ class Organiser extends MyBaseModel
|
||||||
*/
|
*/
|
||||||
public function getFullLogoPathAttribute()
|
public function getFullLogoPathAttribute()
|
||||||
{
|
{
|
||||||
if ($this->logo_path && (file_exists(config('attendize.cdn_url_user_assets').'/'.$this->logo_path) || file_exists(public_path($this->logo_path)))) {
|
if ($this->logo_path && (file_exists(config('attendize.cdn_url_user_assets') . '/' . $this->logo_path) || file_exists(public_path($this->logo_path)))) {
|
||||||
return config('attendize.cdn_url_user_assets').'/'.$this->logo_path;
|
return config('attendize.cdn_url_user_assets') . '/' . $this->logo_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
return config('attendize.fallback_organiser_logo_url');
|
return config('attendize.fallback_organiser_logo_url');
|
||||||
|
|
|
||||||
|
|
@ -2,18 +2,8 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class QuestionOption extends MyBaseModel
|
class QuestionOption extends MyBaseModel
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* The attributes that are mass assignable.
|
|
||||||
*
|
|
||||||
* @access protected
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $fillable = ['name'];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if the model should be timestamped.
|
* Indicates if the model should be timestamped.
|
||||||
*
|
*
|
||||||
|
|
@ -21,6 +11,13 @@ class QuestionOption extends MyBaseModel
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*
|
||||||
|
* @access protected
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $fillable = ['name'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The question associated with the question option.
|
* The question associated with the question option.
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of ReservedTickets.
|
* Description of ReservedTickets.
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@ class Ticket extends MyBaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
protected $perPage = 10;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The rules to validate the model.
|
* The rules to validate the model.
|
||||||
*
|
*
|
||||||
|
|
@ -22,7 +20,6 @@ class Ticket extends MyBaseModel
|
||||||
'end_sale_date' => ['date', 'after:start_sale_date'],
|
'end_sale_date' => ['date', 'after:start_sale_date'],
|
||||||
'quantity_available' => ['integer', 'min:0'],
|
'quantity_available' => ['integer', 'min:0'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The validation error messages.
|
* The validation error messages.
|
||||||
*
|
*
|
||||||
|
|
@ -33,6 +30,7 @@ class Ticket extends MyBaseModel
|
||||||
'title.required' => 'You must at least give a title for your ticket. (e.g Early Bird)',
|
'title.required' => 'You must at least give a title for your ticket. (e.g Early Bird)',
|
||||||
'quantity_available.integer' => 'Please ensure the quantity available is a number.',
|
'quantity_available.integer' => 'Please ensure the quantity available is a number.',
|
||||||
];
|
];
|
||||||
|
protected $perPage = 10;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The event associated with the ticket.
|
* The event associated with the ticket.
|
||||||
|
|
@ -113,31 +111,21 @@ class Ticket extends MyBaseModel
|
||||||
public function getQuantityReservedAttribute()
|
public function getQuantityReservedAttribute()
|
||||||
{
|
{
|
||||||
$reserved_total = \DB::table('reserved_tickets')
|
$reserved_total = \DB::table('reserved_tickets')
|
||||||
->where('ticket_id', $this->id)
|
->where('ticket_id', $this->id)
|
||||||
->where('expires', '>', \Carbon::now())
|
->where('expires', '>', \Carbon::now())
|
||||||
->sum('quantity_reserved');
|
->sum('quantity_reserved');
|
||||||
|
|
||||||
return $reserved_total;
|
return $reserved_total;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the booking fee of the ticket.
|
* Get the total price of the ticket.
|
||||||
*
|
*
|
||||||
* @return float|int
|
* @return float|int
|
||||||
*/
|
*/
|
||||||
public function getBookingFeeAttribute()
|
public function getTotalPriceAttribute()
|
||||||
{
|
{
|
||||||
return (int) ceil($this->price) === 0 ? 0 : round(($this->price * (config('attendize.ticket_booking_fee_percentage') / 100)) + (config('attendize.ticket_booking_fee_fixed')), 2);
|
return $this->getTotalBookingFeeAttribute() + $this->price;
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the organizer's booking fee.
|
|
||||||
*
|
|
||||||
* @return float|int
|
|
||||||
*/
|
|
||||||
public function getOrganiserBookingFeeAttribute()
|
|
||||||
{
|
|
||||||
return (int) ceil($this->price) === 0 ? 0 : round(($this->price * ($this->event->organiser_fee_percentage / 100)) + ($this->event->organiser_fee_fixed), 2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -151,13 +139,25 @@ class Ticket extends MyBaseModel
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the total price of the ticket.
|
* Get the booking fee of the ticket.
|
||||||
*
|
*
|
||||||
* @return float|int
|
* @return float|int
|
||||||
*/
|
*/
|
||||||
public function getTotalPriceAttribute()
|
public function getBookingFeeAttribute()
|
||||||
{
|
{
|
||||||
return $this->getTotalBookingFeeAttribute() + $this->price;
|
return (int)ceil($this->price) === 0 ? 0 : round(($this->price * (config('attendize.ticket_booking_fee_percentage') / 100)) + (config('attendize.ticket_booking_fee_fixed')),
|
||||||
|
2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the organizer's booking fee.
|
||||||
|
*
|
||||||
|
* @return float|int
|
||||||
|
*/
|
||||||
|
public function getOrganiserBookingFeeAttribute()
|
||||||
|
{
|
||||||
|
return (int)ceil($this->price) === 0 ? 0 : round(($this->price * ($this->event->organiser_fee_percentage / 100)) + ($this->event->organiser_fee_fixed),
|
||||||
|
2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -193,17 +193,21 @@ class Ticket extends MyBaseModel
|
||||||
*/
|
*/
|
||||||
public function getSaleStatusAttribute()
|
public function getSaleStatusAttribute()
|
||||||
{
|
{
|
||||||
if ($this->start_sale_date !== null && $this->start_sale_date->isFuture())
|
if ($this->start_sale_date !== null && $this->start_sale_date->isFuture()) {
|
||||||
return config('attendize.ticket_status_before_sale_date');
|
return config('attendize.ticket_status_before_sale_date');
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->end_sale_date !== null && $this->end_sale_date->isPast())
|
if ($this->end_sale_date !== null && $this->end_sale_date->isPast()) {
|
||||||
return config('attendize.ticket_status_after_sale_date');
|
return config('attendize.ticket_status_after_sale_date');
|
||||||
|
}
|
||||||
|
|
||||||
if ((int) $this->quantity_available > 0 && (int) $this->quantity_remaining <= 0)
|
if ((int)$this->quantity_available > 0 && (int)$this->quantity_remaining <= 0) {
|
||||||
return config('attendize.ticket_status_sold_out');
|
return config('attendize.ticket_status_sold_out');
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->event->start_date->lte(\Carbon::now()))
|
if ($this->event->start_date->lte(\Carbon::now())) {
|
||||||
return config('attendize.ticket_status_off_sale');
|
return config('attendize.ticket_status_off_sale');
|
||||||
|
}
|
||||||
|
|
||||||
return config('attendize.ticket_status_on_sale');
|
return config('attendize.ticket_status_on_sale');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of TicketStatuses.
|
* Description of TicketStatuses.
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Attendize.com - Event Management & Ticketing
|
Attendize.com - Event Management & Ticketing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of Timezone.
|
* Description of Timezone.
|
||||||
|
|
@ -15,7 +15,6 @@ class Timezone extends \Illuminate\Database\Eloquent\Model
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Indicates if the model should be timestamped.
|
* Indicates if the model should be timestamped.
|
||||||
|
|
||||||
*
|
*
|
||||||
* @var bool $timestamps
|
* @var bool $timestamps
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||||
*/
|
*/
|
||||||
public function getFullNameAttribute()
|
public function getFullNameAttribute()
|
||||||
{
|
{
|
||||||
return $this->first_name.' '.$this->last_name;
|
return $this->first_name . ' ' . $this->last_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class AppServiceProvider extends ServiceProvider
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
$this->app->bind(
|
$this->app->bind(
|
||||||
'Illuminate\Contracts\Auth\Registrar', 'App\Services\Registrar'
|
'Illuminate\Contracts\Auth\Registrar', 'App\Services\Registrar'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ class AuthServiceProvider extends ServiceProvider
|
||||||
/**
|
/**
|
||||||
* Register any application authentication / authorization services.
|
* Register any application authentication / authorization services.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Contracts\Auth\Access\Gate $gate
|
* @param \Illuminate\Contracts\Auth\Access\Gate $gate
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function boot(GateContract $gate)
|
public function boot(GateContract $gate)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Transformers;
|
||||||
|
|
||||||
|
|
||||||
|
class EventTransformer extends Transformer
|
||||||
|
{
|
||||||
|
public function transform($event)
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'id' => $event['id'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Transformers;
|
||||||
|
|
||||||
|
|
||||||
|
abstract class Transformer
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param $item
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public abstract function transform($item);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $items
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function transformCollection(array $items)
|
||||||
|
{
|
||||||
|
return array_map([$this, 'transform'], $items);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"hash": "7a65c338ea81597aed061e748f1e8f00",
|
"hash": "7b1126b16006b172d42d088ccd9ff54e",
|
||||||
"content-hash": "27392018d8b69d79a355d369b2712fdb",
|
"content-hash": "a5aca37d7aaec7360f32b22ffabb7bb2",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "aws/aws-sdk-php",
|
"name": "aws/aws-sdk-php",
|
||||||
|
|
@ -141,6 +141,137 @@
|
||||||
],
|
],
|
||||||
"time": "2015-11-09 22:51:51"
|
"time": "2015-11-09 22:51:51"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "dingo/api",
|
||||||
|
"version": "dev-master",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/dingo/api.git",
|
||||||
|
"reference": "242411efbb9f01104a00b780c4defb2c18a45856"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/dingo/api/zipball/242411efbb9f01104a00b780c4defb2c18a45856",
|
||||||
|
"reference": "242411efbb9f01104a00b780c4defb2c18a45856",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"dingo/blueprint": "0.2.*",
|
||||||
|
"doctrine/annotations": "1.2.*",
|
||||||
|
"illuminate/routing": "5.1.* || 5.2.* || 5.3.*",
|
||||||
|
"illuminate/support": "5.1.* || 5.2.* || 5.3.*",
|
||||||
|
"league/fractal": ">=0.12.0",
|
||||||
|
"php": "^5.5.9 || ^7.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"illuminate/auth": "5.1.* || 5.2.* || 5.3.*",
|
||||||
|
"illuminate/cache": "5.1.* || 5.2.* || 5.3.*",
|
||||||
|
"illuminate/console": "5.1.* || 5.2.* || 5.3.*",
|
||||||
|
"illuminate/database": "5.1.* || 5.2.* || 5.3.*",
|
||||||
|
"illuminate/events": "5.1.* || 5.2.* || 5.3.*",
|
||||||
|
"illuminate/filesystem": "5.1.* || 5.2.* || 5.3.*",
|
||||||
|
"illuminate/log": "5.1.* || 5.2.* || 5.3.*",
|
||||||
|
"illuminate/pagination": "5.1.* || 5.2.* || 5.3.*",
|
||||||
|
"laravel/lumen-framework": "5.1.* || 5.2.*",
|
||||||
|
"lucadegasperi/oauth2-server-laravel": "5.0.*",
|
||||||
|
"mockery/mockery": "~0.9",
|
||||||
|
"phpunit/phpunit": "^4.8 || ^5.0",
|
||||||
|
"squizlabs/php_codesniffer": "~2.0",
|
||||||
|
"tymon/jwt-auth": "1.0.*"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"lucadegasperi/oauth2-server-laravel": "Protect your API with OAuth 2.0.",
|
||||||
|
"tymon/jwt-auth": "Protect your API with JSON Web Tokens."
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Dingo\\Api\\": "src/"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/helpers.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"BSD-3-Clause"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jason Lewis",
|
||||||
|
"email": "jason.lewis1991@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A RESTful API package for the Laravel and Lumen frameworks.",
|
||||||
|
"keywords": [
|
||||||
|
"api",
|
||||||
|
"dingo",
|
||||||
|
"laravel",
|
||||||
|
"restful"
|
||||||
|
],
|
||||||
|
"time": "2016-09-02 05:51:07"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dingo/blueprint",
|
||||||
|
"version": "v0.2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/dingo/blueprint.git",
|
||||||
|
"reference": "d37fb7433aeadb3d40d5e790978c3c8d229d0e7d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/dingo/blueprint/zipball/d37fb7433aeadb3d40d5e790978c3c8d229d0e7d",
|
||||||
|
"reference": "d37fb7433aeadb3d40d5e790978c3c8d229d0e7d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"doctrine/annotations": "1.2.*",
|
||||||
|
"illuminate/filesystem": "5.1.* || 5.2.* || 5.3.*",
|
||||||
|
"illuminate/support": "5.1.* || 5.2.* || 5.3.*",
|
||||||
|
"php": ">=5.5.9",
|
||||||
|
"phpdocumentor/reflection-docblock": "3.1.*"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "~4.0",
|
||||||
|
"squizlabs/php_codesniffer": "~2.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "0.2-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Dingo\\Blueprint\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"BSD-3-Clause"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jason Lewis",
|
||||||
|
"email": "jason.lewis1991@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "API Blueprint documentation generator.",
|
||||||
|
"keywords": [
|
||||||
|
"api",
|
||||||
|
"blueprint",
|
||||||
|
"dingo",
|
||||||
|
"docs",
|
||||||
|
"laravel"
|
||||||
|
],
|
||||||
|
"time": "2016-08-30 03:27:49"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "dnoegel/php-xdg-base-dir",
|
"name": "dnoegel/php-xdg-base-dir",
|
||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
|
|
@ -174,6 +305,74 @@
|
||||||
"description": "implementation of xdg base directory specification for php",
|
"description": "implementation of xdg base directory specification for php",
|
||||||
"time": "2014-10-24 07:27:01"
|
"time": "2014-10-24 07:27:01"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "doctrine/annotations",
|
||||||
|
"version": "v1.2.7",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/doctrine/annotations.git",
|
||||||
|
"reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535",
|
||||||
|
"reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"doctrine/lexer": "1.*",
|
||||||
|
"php": ">=5.3.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"doctrine/cache": "1.*",
|
||||||
|
"phpunit/phpunit": "4.*"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.3.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"Doctrine\\Common\\Annotations\\": "lib/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Roman Borschel",
|
||||||
|
"email": "roman@code-factory.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Benjamin Eberlei",
|
||||||
|
"email": "kontakt@beberlei.de"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Guilherme Blanco",
|
||||||
|
"email": "guilhermeblanco@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jonathan Wage",
|
||||||
|
"email": "jonwage@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Johannes Schmitt",
|
||||||
|
"email": "schmittjoh@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Docblock Annotations Parser",
|
||||||
|
"homepage": "http://www.doctrine-project.org",
|
||||||
|
"keywords": [
|
||||||
|
"annotations",
|
||||||
|
"docblock",
|
||||||
|
"parser"
|
||||||
|
],
|
||||||
|
"time": "2015-08-31 12:32:49"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/inflector",
|
"name": "doctrine/inflector",
|
||||||
"version": "v1.1.0",
|
"version": "v1.1.0",
|
||||||
|
|
@ -241,6 +440,60 @@
|
||||||
],
|
],
|
||||||
"time": "2015-11-06 14:35:42"
|
"time": "2015-11-06 14:35:42"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "doctrine/lexer",
|
||||||
|
"version": "v1.0.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/doctrine/lexer.git",
|
||||||
|
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
|
||||||
|
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.2"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"Doctrine\\Common\\Lexer\\": "lib/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Roman Borschel",
|
||||||
|
"email": "roman@code-factory.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Guilherme Blanco",
|
||||||
|
"email": "guilhermeblanco@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Johannes Schmitt",
|
||||||
|
"email": "schmittjoh@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
|
||||||
|
"homepage": "http://www.doctrine-project.org",
|
||||||
|
"keywords": [
|
||||||
|
"lexer",
|
||||||
|
"parser"
|
||||||
|
],
|
||||||
|
"time": "2014-09-09 13:34:57"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "dompdf/dompdf",
|
"name": "dompdf/dompdf",
|
||||||
"version": "dev-master",
|
"version": "dev-master",
|
||||||
|
|
@ -251,7 +504,7 @@
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/8db6e1478e11b4e2bd0753c903dabe375b58ac3b",
|
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/e4b49285f8c7165f31b5cc6395a5ee1bbc35144a",
|
||||||
"reference": "8db6e1478e11b4e2bd0753c903dabe375b58ac3b",
|
"reference": "8db6e1478e11b4e2bd0753c903dabe375b58ac3b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
|
|
@ -719,7 +972,7 @@
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Intervention/image/zipball/22088b04728a039bd1fc32f7e79a89a118b78698",
|
"url": "https://api.github.com/repos/Intervention/image/zipball/4064a980324f6c3bfa2bd981dfb247afa705ec3c",
|
||||||
"reference": "22088b04728a039bd1fc32f7e79a89a118b78698",
|
"reference": "22088b04728a039bd1fc32f7e79a89a118b78698",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
|
|
@ -1471,6 +1724,69 @@
|
||||||
"description": "Flysystem adapter for the AWS S3 SDK v3.x",
|
"description": "Flysystem adapter for the AWS S3 SDK v3.x",
|
||||||
"time": "2016-06-06 11:18:47"
|
"time": "2016-06-06 11:18:47"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "league/fractal",
|
||||||
|
"version": "0.14.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/thephpleague/fractal.git",
|
||||||
|
"reference": "56ad8933fbb40328ca3321c84143b2c16186eebf"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/thephpleague/fractal/zipball/56ad8933fbb40328ca3321c84143b2c16186eebf",
|
||||||
|
"reference": "56ad8933fbb40328ca3321c84143b2c16186eebf",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"illuminate/contracts": "~5.0",
|
||||||
|
"mockery/mockery": "~0.9",
|
||||||
|
"pagerfanta/pagerfanta": "~1.0.0",
|
||||||
|
"phpunit/phpunit": "~4.0",
|
||||||
|
"squizlabs/php_codesniffer": "~1.5",
|
||||||
|
"zendframework/zend-paginator": "~2.3"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"illuminate/pagination": "The Illuminate Pagination component.",
|
||||||
|
"pagerfanta/pagerfanta": "Pagerfanta Paginator",
|
||||||
|
"zendframework/zend-paginator": "Zend Framework Paginator"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "0.13-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"League\\Fractal\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Phil Sturgeon",
|
||||||
|
"email": "me@philsturgeon.uk",
|
||||||
|
"homepage": "http://philsturgeon.uk/",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Handle the output of complex data structures ready for API output.",
|
||||||
|
"homepage": "http://fractal.thephpleague.com/",
|
||||||
|
"keywords": [
|
||||||
|
"api",
|
||||||
|
"json",
|
||||||
|
"league",
|
||||||
|
"rest"
|
||||||
|
],
|
||||||
|
"time": "2016-07-21 09:56:14"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "league/oauth1-client",
|
"name": "league/oauth1-client",
|
||||||
"version": "1.6.1",
|
"version": "1.6.1",
|
||||||
|
|
@ -2522,6 +2838,152 @@
|
||||||
"homepage": "https://github.com/PhenX/php-svg-lib",
|
"homepage": "https://github.com/PhenX/php-svg-lib",
|
||||||
"time": "2015-05-06 18:49:49"
|
"time": "2015-05-06 18:49:49"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "phpdocumentor/reflection-common",
|
||||||
|
"version": "1.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
|
||||||
|
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
|
||||||
|
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.5"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^4.6"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"phpDocumentor\\Reflection\\": [
|
||||||
|
"src"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jaap van Otterdijk",
|
||||||
|
"email": "opensource@ijaap.nl"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
|
||||||
|
"homepage": "http://www.phpdoc.org",
|
||||||
|
"keywords": [
|
||||||
|
"FQSEN",
|
||||||
|
"phpDocumentor",
|
||||||
|
"phpdoc",
|
||||||
|
"reflection",
|
||||||
|
"static analysis"
|
||||||
|
],
|
||||||
|
"time": "2015-12-27 11:43:31"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "phpdocumentor/reflection-docblock",
|
||||||
|
"version": "3.1.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||||
|
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd",
|
||||||
|
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.5",
|
||||||
|
"phpdocumentor/reflection-common": "^1.0@dev",
|
||||||
|
"phpdocumentor/type-resolver": "^0.2.0",
|
||||||
|
"webmozart/assert": "^1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "^0.9.4",
|
||||||
|
"phpunit/phpunit": "^4.4"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"phpDocumentor\\Reflection\\": [
|
||||||
|
"src/"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Mike van Riel",
|
||||||
|
"email": "me@mikevanriel.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||||
|
"time": "2016-06-10 09:48:41"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "phpdocumentor/type-resolver",
|
||||||
|
"version": "0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||||
|
"reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443",
|
||||||
|
"reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.5",
|
||||||
|
"phpdocumentor/reflection-common": "^1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "^0.9.4",
|
||||||
|
"phpunit/phpunit": "^5.2||^4.8.24"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"phpDocumentor\\Reflection\\": [
|
||||||
|
"src/"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Mike van Riel",
|
||||||
|
"email": "me@mikevanriel.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2016-06-10 07:14:17"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "phpoffice/phpexcel",
|
"name": "phpoffice/phpexcel",
|
||||||
"version": "1.8.1",
|
"version": "1.8.1",
|
||||||
|
|
@ -3846,7 +4308,7 @@
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Vinelab/http/zipball/26974a6f2c635795aed893f9aa0f87118f137d95",
|
"url": "https://api.github.com/repos/Vinelab/http/zipball/30b6f71c127dbc213e56d1d07c4bfeca8224604f",
|
||||||
"reference": "26974a6f2c635795aed893f9aa0f87118f137d95",
|
"reference": "26974a6f2c635795aed893f9aa0f87118f137d95",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
|
|
@ -3935,6 +4397,55 @@
|
||||||
"environment"
|
"environment"
|
||||||
],
|
],
|
||||||
"time": "2016-06-14 14:14:52"
|
"time": "2016-06-14 14:14:52"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "webmozart/assert",
|
||||||
|
"version": "1.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/webmozart/assert.git",
|
||||||
|
"reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
|
||||||
|
"reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^4.6"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Webmozart\\Assert\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Bernhard Schussek",
|
||||||
|
"email": "bschussek@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Assertions to validate method input/output with nice error messages.",
|
||||||
|
"keywords": [
|
||||||
|
"assert",
|
||||||
|
"check",
|
||||||
|
"validate"
|
||||||
|
],
|
||||||
|
"time": "2015-08-24 13:29:44"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
|
|
@ -4053,74 +4564,6 @@
|
||||||
],
|
],
|
||||||
"time": "2016-06-13 19:28:20"
|
"time": "2016-06-13 19:28:20"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "doctrine/annotations",
|
|
||||||
"version": "v1.2.7",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/doctrine/annotations.git",
|
|
||||||
"reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535",
|
|
||||||
"reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"doctrine/lexer": "1.*",
|
|
||||||
"php": ">=5.3.2"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"doctrine/cache": "1.*",
|
|
||||||
"phpunit/phpunit": "4.*"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.3.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-0": {
|
|
||||||
"Doctrine\\Common\\Annotations\\": "lib/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Roman Borschel",
|
|
||||||
"email": "roman@code-factory.org"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Benjamin Eberlei",
|
|
||||||
"email": "kontakt@beberlei.de"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Guilherme Blanco",
|
|
||||||
"email": "guilhermeblanco@gmail.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Jonathan Wage",
|
|
||||||
"email": "jonwage@gmail.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Johannes Schmitt",
|
|
||||||
"email": "schmittjoh@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Docblock Annotations Parser",
|
|
||||||
"homepage": "http://www.doctrine-project.org",
|
|
||||||
"keywords": [
|
|
||||||
"annotations",
|
|
||||||
"docblock",
|
|
||||||
"parser"
|
|
||||||
],
|
|
||||||
"time": "2015-08-31 12:32:49"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "doctrine/cache",
|
"name": "doctrine/cache",
|
||||||
"version": "v1.6.0",
|
"version": "v1.6.0",
|
||||||
|
|
@ -4455,60 +4898,6 @@
|
||||||
],
|
],
|
||||||
"time": "2015-06-14 21:17:01"
|
"time": "2015-06-14 21:17:01"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "doctrine/lexer",
|
|
||||||
"version": "v1.0.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/doctrine/lexer.git",
|
|
||||||
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c",
|
|
||||||
"reference": "83893c552fd2045dd78aef794c31e694c37c0b8c",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.2"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-0": {
|
|
||||||
"Doctrine\\Common\\Lexer\\": "lib/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Roman Borschel",
|
|
||||||
"email": "roman@code-factory.org"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Guilherme Blanco",
|
|
||||||
"email": "guilhermeblanco@gmail.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Johannes Schmitt",
|
|
||||||
"email": "schmittjoh@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
|
|
||||||
"homepage": "http://www.doctrine-project.org",
|
|
||||||
"keywords": [
|
|
||||||
"lexer",
|
|
||||||
"parser"
|
|
||||||
],
|
|
||||||
"time": "2014-09-09 13:34:57"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "fzaninotto/faker",
|
"name": "fzaninotto/faker",
|
||||||
"version": "v1.6.0",
|
"version": "v1.6.0",
|
||||||
|
|
@ -4557,152 +4946,6 @@
|
||||||
],
|
],
|
||||||
"time": "2016-04-29 12:21:54"
|
"time": "2016-04-29 12:21:54"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "phpdocumentor/reflection-common",
|
|
||||||
"version": "1.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
|
|
||||||
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
|
|
||||||
"reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.5"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^4.6"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"phpDocumentor\\Reflection\\": [
|
|
||||||
"src"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Jaap van Otterdijk",
|
|
||||||
"email": "opensource@ijaap.nl"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
|
|
||||||
"homepage": "http://www.phpdoc.org",
|
|
||||||
"keywords": [
|
|
||||||
"FQSEN",
|
|
||||||
"phpDocumentor",
|
|
||||||
"phpdoc",
|
|
||||||
"reflection",
|
|
||||||
"static analysis"
|
|
||||||
],
|
|
||||||
"time": "2015-12-27 11:43:31"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "phpdocumentor/reflection-docblock",
|
|
||||||
"version": "3.1.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
|
||||||
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd",
|
|
||||||
"reference": "9270140b940ff02e58ec577c237274e92cd40cdd",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.5",
|
|
||||||
"phpdocumentor/reflection-common": "^1.0@dev",
|
|
||||||
"phpdocumentor/type-resolver": "^0.2.0",
|
|
||||||
"webmozart/assert": "^1.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"mockery/mockery": "^0.9.4",
|
|
||||||
"phpunit/phpunit": "^4.4"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"phpDocumentor\\Reflection\\": [
|
|
||||||
"src/"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Mike van Riel",
|
|
||||||
"email": "me@mikevanriel.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
|
||||||
"time": "2016-06-10 09:48:41"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "phpdocumentor/type-resolver",
|
|
||||||
"version": "0.2",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
|
||||||
"reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443",
|
|
||||||
"reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.5",
|
|
||||||
"phpdocumentor/reflection-common": "^1.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"mockery/mockery": "^0.9.4",
|
|
||||||
"phpunit/phpunit": "^5.2||^4.8.24"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"phpDocumentor\\Reflection\\": [
|
|
||||||
"src/"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Mike van Riel",
|
|
||||||
"email": "me@mikevanriel.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"time": "2016-06-10 07:14:17"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "phpspec/php-diff",
|
"name": "phpspec/php-diff",
|
||||||
"version": "v1.0.2",
|
"version": "v1.0.2",
|
||||||
|
|
@ -5779,55 +6022,6 @@
|
||||||
"description": "Symfony Yaml Component",
|
"description": "Symfony Yaml Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2016-05-26 21:46:24"
|
"time": "2016-05-26 21:46:24"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "webmozart/assert",
|
|
||||||
"version": "1.0.2",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/webmozart/assert.git",
|
|
||||||
"reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
|
|
||||||
"reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.3"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^4.6"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.0-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Webmozart\\Assert\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Bernhard Schussek",
|
|
||||||
"email": "bschussek@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Assertions to validate method input/output with nice error messages.",
|
|
||||||
"keywords": [
|
|
||||||
"assert",
|
|
||||||
"check",
|
|
||||||
"validate"
|
|
||||||
],
|
|
||||||
"time": "2015-08-24 13:29:44"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
|
@ -5840,7 +6034,8 @@
|
||||||
"vinelab/http": 20,
|
"vinelab/http": 20,
|
||||||
"maxhoffmann/parsedown-laravel": 20,
|
"maxhoffmann/parsedown-laravel": 20,
|
||||||
"omnipay/bitpay": 20,
|
"omnipay/bitpay": 20,
|
||||||
"omnipay/coinbase": 20
|
"omnipay/coinbase": 20,
|
||||||
|
"dingo/api": 20
|
||||||
},
|
},
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,7 @@ return [
|
||||||
MaxHoffmann\Parsedown\ParsedownServiceProvider::class,
|
MaxHoffmann\Parsedown\ParsedownServiceProvider::class,
|
||||||
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
|
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
|
||||||
Laracasts\Utilities\JavaScript\JavaScriptServiceProvider::class,
|
Laracasts\Utilities\JavaScript\JavaScriptServiceProvider::class,
|
||||||
|
Dingo\Api\Provider\LaravelServiceProvider::class,
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue