Skip to content

Commit

Permalink
disable shareiftar
Browse files Browse the repository at this point in the history
  • Loading branch information
DilwoarH committed May 23, 2020
1 parent b1f8faf commit 3b86c64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Services/User/OrderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ public function canOrder()
'messages' => [],
];

if (!config('shareiftar.enabled')) {
$result['messages'][] = "Share iftar platform is currently disabled.";
return $result;
}

$user = auth()->user();

// check if user has already ordered today
Expand Down
1 change: 1 addition & 0 deletions config/shareiftar.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

return [
'enabled' => env('SHARE_IFTAR_ENABLED', true),
'radius' => env('SHARE_IFTAR_RADIUS', 5),
'enable_timeout' => env('SHARE_IFTAR_ENABLE_TIMEOUT', true),
];

0 comments on commit 3b86c64

Please sign in to comment.