Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
39 changes: 0 additions & 39 deletions app/.env.cop

This file was deleted.

Binary file removed app/.test.php.swp
Binary file not shown.
Binary file removed app/app/.PortNumber.php.swp
Binary file not shown.
Binary file removed app/app/.User.php.swp
Binary file not shown.
Binary file removed app/app/.UserDebit.php.swp
Binary file not shown.
2 changes: 1 addition & 1 deletion app/app/Call.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use App\ApiResource;
use App\Helpers\MainHelper;

class Call extends ApiResource {
class Call extends Model {
protected $dates = ['created_at', 'updated_at', 'started_at', 'ended_at'];

protected $guarded = array('id');
Expand Down
89 changes: 26 additions & 63 deletions app/app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,47 @@

namespace App\Exceptions;

use Exception;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;

class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
* A list of exception types with their corresponding custom log levels.
*
* @var array
* @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
*/
protected $dontReport = [
HttpException::class,
ModelNotFoundException::class,
protected $levels = [
//
];

/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
* A list of the exception types that are not reported.
*
* @param \Exception $e
* @return void
* @var array<int, class-string<\Throwable>>
*/
public function report(Exception $e)
{
if (app()->bound('sentry') && $this->shouldReport($e)) {
app('sentry')->captureException($e);
}
return parent::report($e);
}
protected $dontReport = [
//
];

/**
* Render an exception into an HTTP response.
* A list of the inputs that are never flashed to the session on validation exceptions.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
* @var array<int, string>
*/
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];

/**
* Register the exception handling callbacks for the application.
*/
public function render($request, Exception $e)
public function register(): void
{
if ($e instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException)
{
//Ajax Requests
if($request->ajax() || $request->wantsJson())
{
$data = [
'error' => true,
'message' => 'The route is not defined',
];
return Response::json($data, '404');
}
else
{
//Return view
return response()->view('pages.notfound_404');
}
}
//Handle HTTP Method Not Allowed
if ($e instanceof \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException)
{
//Ajax Requests
if($request->ajax() || $request->wantsJson())
{
$data = [
'error' => true,
'message' => 'The http method not allowed',
];
return Response::json($data, '404');
}
else
{
//Return view
return response()->view('pages.notfound_404');
}
}
return parent::render($request, $e);
$this->reportable(function (Throwable $e) {
//
});
}
}
}
111 changes: 44 additions & 67 deletions app/app/Helpers/AdminUIHelper.php
Original file line number Diff line number Diff line change
@@ -1,46 +1,25 @@
<?php
namespace App\Helpers;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
use App\DIDNumber;
use App\Extension;
use App\Workspace;
use App\Flow;
use App\FlowTemplate;
use App\ExtensionCode;
use Config;
use Auth;
use DB;

use PayPal\Auth\OAuthTokenCredential;
use PayPal\Rest\ApiContext;
use App\User;
use JWTAuth;
use JWTFactory;
use Tymon\JWTAuth\Exceptions\JWTException;
use DateTime;
use App\SIPCountry;
use App\SIPRegion;
use App\SIPRateCenter;


final class AdminUIHelper {
public static function getCannedEmails() {
$emails = [];
$body1 = <<<EOF
final class AdminUIHelper
{
public static function getCannedEmails()
{
$emails = [];
$body1 = <<<EOF
Hello {{user.first_name}},<br/><br/>

Thanks for registering on Lineblocs. We are here to help and support you!. Please contact me to schedule a call to go over the system. My email is {{admin.email}}. my number is {{admin.office_number}}
<br/><br/>
{{lineblocs.signature}}
EOF;
$emails[] = [
'name' => 'Ask For Demo',
'value' => 'ask-demo',
'email_subject' => 'Lineblocs Demo',
'email_body' => $body1
];
$body2 = <<<EOF
$emails[] = [
'name' => 'Ask For Demo',
'value' => 'ask-demo',
'email_subject' => 'Lineblocs Demo',
'email_body' => $body1,
];
$body2 = <<<EOF
Hello {{user.first_name}},<br/><br/>

Below are some video introductions that will help you get started with lineblocs.<br/><br/>
Expand All @@ -53,27 +32,27 @@ public static function getCannedEmails() {
<br/><br/>
{{lineblocs.signature}}
EOF;
$emails[] = [
'name' => 'Video Intros',
'value' => 'video-intros',
'email_subject' => 'Lineblocs Video Resources',
'email_body' => $body2
];

$body3 = <<<EOF
$emails[] = [
'name' => 'Video Intros',
'value' => 'video-intros',
'email_subject' => 'Lineblocs Video Resources',
'email_body' => $body2,
];

$body3 = <<<EOF
Hi {{user.first_name}},<br/><br/>
Hope all is well. Checking back in to see if you were interested in further discussing Lineblocs for {{user.company_name}}.<br/><br/>
Let me know when it would be best to connect.<br/><br/>

{{lineblocs.signature}}
EOF;
$emails[] = [
'name' => 'Follow Up',
'value' => 'follow-up',
'email_subject' => 'Lineblocs Follow Up',
'email_body' => $body3
];
$body4 = <<<EOF
$emails[] = [
'name' => 'Follow Up',
'value' => 'follow-up',
'email_subject' => 'Lineblocs Follow Up',
'email_body' => $body3,
];
$body4 = <<<EOF
Hi {{user.first_name}},<br/><br/>

Hope you’ve been well. I wanted to share with you our latest news about Lineblocs<br/><br/>
Expand All @@ -82,29 +61,27 @@ public static function getCannedEmails() {

{{lineblocs.signature}}
EOF;
$emails[] = [
'name' => 'Follow Up 2',
'value' => 'follow-up-2',
'email_subject' => 'Lineblocs Latest News Follow Up',
'email_body' => $body4
];
$body5 = <<<EOF
$emails[] = [
'name' => 'Follow Up 2',
'value' => 'follow-up-2',
'email_subject' => 'Lineblocs Latest News Follow Up',
'email_body' => $body4,
];
$body5 = <<<EOF
{{user.first_name}},<br/><br/>

I wanted to make one last attempt to get in touch regarding Lineblocs. If you’re interested in reviewing the platform, let me know if we can schedule a call in May.<br/>
If I don't hear back, I'll assume the team already has an excellent resource for a cloud communications tool.<br/><br/>

{{lineblocs.signature}}
EOF;
$emails[] = [
'name' => 'Still Interested',
'value' => 'still-interested',
'email_subject' => 'Are you still interested ?',
'email_body' => $body5
];



return $emails;
}
$emails[] = [
'name' => 'Still Interested',
'value' => 'still-interested',
'email_subject' => 'Are you still interested ?',
'email_body' => $body5,
];

return $emails;
}
}
Loading