Merge pull request #636 from publicarray/env-config

Move env to config files
This commit is contained in:
Jeremy Quinton 2019-05-29 16:07:15 +02:00 committed by GitHub
commit e11c438530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 10 deletions

View File

@ -168,7 +168,7 @@ class EventCheckInController extends MyBaseController
if ($attendee->has_arrived) {
return response()->json([
'status' => 'error',
'message' => trans("Controllers.attendee_already_checked_in", ["time"=> $attendee->arrival_time->format(env("DEFAULT_DATETIME_FORMAT"))])
'message' => trans("Controllers.attendee_already_checked_in", ["time"=> $attendee->arrival_time->format(config("attendize.default_datetime_format"))])
]);
}

View File

@ -69,5 +69,8 @@ return [
'default_payment_gateway' => 1, #Stripe=1 Paypal=2
'cdn_url_user_assets' => '',
'cdn_url_static_assets' => ''
'cdn_url_static_assets' => '',
'google_analytics_id' => env('GOOGLE_ANALYTICS_ID'),
'google_maps_geocoding_key' => env('GOOGLE_MAPS_GEOCODING_KEY')
];

View File

@ -28,7 +28,7 @@
@stop
@section('head')
{!! HTML::script('https://maps.googleapis.com/maps/api/js?libraries=places&key='.env("GOOGLE_MAPS_GEOCODING_KEY")) !!}
{!! HTML::script('https://maps.googleapis.com/maps/api/js?libraries=places&key='.config("attendize.google_maps_geocoding_key")) !!}
{!! HTML::script('vendor/geocomplete/jquery.geocomplete.min.js') !!}
<script>
$(function () {
@ -245,7 +245,7 @@
<td>{{ $affiliate->visits }}</td>
<td>{{ $affiliate->tickets_sold }}</td>
<td>{{ money($affiliate->sales_volume, $event->currency) }}</td>
<td>{{ $affiliate->updated_at->format(env("DEFAULT_DATETIME_FORMAT")) }}</td>
<td>{{ $affiliate->updated_at->format(config("attendize.default_datetime_format")) }}</td>
</tr>
@endforeach
</tbody>

View File

@ -84,7 +84,7 @@
<tr>
<td class="meta">
@if($message->sent_at!=null) <?php /* Can occur when there was mailing error*/ ?>
<p class="date">{{$message->sent_at->format(env("DEFAULT_DATETIME_FORMAT"))}}</p>
<p class="date">{{$message->sent_at->format(config("attendize.default_datetime_format"))}}</p>
@else
<p class="date">@lang("Message.unsent")</p>
@endif

View File

@ -41,7 +41,7 @@
<td>{{{$attendee->email}}}</td>
<td>{{{$attendee->ticket->title}}}</td>
<td>{{{$attendee->order->order_reference}}}</td>
<td>{{$attendee->created_at->format(env("DEFAULT_DATETIME_FORMAT"))}}</td>
<td>{{$attendee->created_at->format(config("attendize.default_datetime_format"))}}</td>
<td><input type="checkbox" style="border: 1px solid #000; height: 15px; width: 15px;" /></td>
</tr>
@endforeach

View File

@ -22,7 +22,7 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.4/raphael-min.js" integrity="sha256-Gk+dzc4kV2rqAZMkyy3gcfW6Xd66BhGYjVWa/FjPu+s=" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js" integrity="sha256-0rg2VtfJo3VUij/UY9X0HJP7NET6tgAY98aMOfwP0P8=" crossorigin="anonymous"></script>
{!! HTML::script('https://maps.googleapis.com/maps/api/js?libraries=places&key='.env("GOOGLE_MAPS_GEOCODING_KEY")) !!}
{!! HTML::script('https://maps.googleapis.com/maps/api/js?libraries=places&key='.config("attendize.google_maps_geocoding_key")) !!}
{!! HTML::script('vendor/geocomplete/jquery.geocomplete.min.js')!!}
{!! HTML::script('vendor/moment/moment.js')!!}
{!! HTML::script('vendor/fullcalendar/dist/fullcalendar.min.js')!!}

View File

@ -14,7 +14,7 @@
@stop
@section('head')
{!! HTML::script('https://maps.googleapis.com/maps/api/js?libraries=places&key='.env("GOOGLE_MAPS_GEOCODING_KEY")) !!}
{!! HTML::script('https://maps.googleapis.com/maps/api/js?libraries=places&key='.config("attendize.google_maps_geocoding_key")) !!}
{!! HTML::script('vendor/geocomplete/jquery.geocomplete.min.js')!!}
@stop

View File

@ -2,7 +2,7 @@
<script>showMessage('{{\Session::get('message')}}');</script>
@endif
@if(env('GOOGLE_ANALYTICS_ID'))
@if(config('attendize.google_analytics_id'))
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
@ -16,7 +16,7 @@
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', '{{env('GOOGLE_ANALYTICS_ID')}}', 'auto');
ga('create', '{{config('attendize.google_analytics_id')}}', 'auto');
ga('require', 'displayfeatures');
ga('send', 'pageview');
</script>