Skip to content

Commit

Permalink
Merge pull request #48 from devaslanphp/dev
Browse files Browse the repository at this point in the history
Bug-fix: Ticket creation
  • Loading branch information
heloufir authored Sep 19, 2022
2 parents 54e7882 + db93a80 commit 96c0f77
Show file tree
Hide file tree
Showing 6 changed files with 230 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/Models/Ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function comments(): HasMany
public function ticketNumber(): Attribute
{
return new Attribute(
get: fn() => $this->project->ticket_prefix . '' . $this->number
get: fn() => $this->project?->ticket_prefix . '' . $this->number
);
}
}
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"filament/notifications": "^2.15",
"guzzlehttp/guzzle": "^7.2",
"invaders-xx/filament-kanban-board": "^0.2.6",
"larabug/larabug": "^2.5",
"laravel/framework": "^9.19",
"laravel/sanctum": "^3.0",
"laravel/tinker": "^2.7",
Expand Down
72 changes: 70 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

145 changes: 145 additions & 0 deletions config/larabug.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Login key
|--------------------------------------------------------------------------
|
| This is your authorization key which you get from your profile.
| Retrieve your key from https://www.larabug.com
|
*/

'login_key' => env('LB_KEY', ''),

/*
|--------------------------------------------------------------------------
| Project key
|--------------------------------------------------------------------------
|
| This is your project key which you receive when creating a project
| Retrieve your key from https://www.larabug.com
|
*/

'project_key' => env('LB_PROJECT_KEY', ''),

/*
|--------------------------------------------------------------------------
| Environment setting
|--------------------------------------------------------------------------
|
| This setting determines if the exception should be send over or not.
|
*/

'environments' => [
'production',
],

/*
|--------------------------------------------------------------------------
| Project version
|--------------------------------------------------------------------------
|
| Set the project version, default: null.
| For git repository: shell_exec("git log -1 --pretty=format:'%h' --abbrev-commit")
|
*/
'project_version' => null,

/*
|--------------------------------------------------------------------------
| Lines near exception
|--------------------------------------------------------------------------
|
| How many lines to show near exception line. The more you specify the bigger
| the displayed code will be. Max value can be 50, will be defaulted to
| 12 if higher than 50 automatically.
|
*/

'lines_count' => 12,

/*
|--------------------------------------------------------------------------
| Prevent duplicates
|--------------------------------------------------------------------------
|
| Set the sleep time between duplicate exceptions. This value is in seconds, default: 60 seconds (1 minute)
|
*/

'sleep' => 60,

/*
|--------------------------------------------------------------------------
| Skip exceptions
|--------------------------------------------------------------------------
|
| List of exceptions to skip sending.
|
*/

'except' => [
'Symfony\Component\HttpKernel\Exception\NotFoundHttpException',
],

/*
|--------------------------------------------------------------------------
| Key filtering
|--------------------------------------------------------------------------
|
| Filter out these variables before sending them to LaraBug
|
*/

'blacklist' => [
'*authorization*',
'*password*',
'*token*',
'*auth*',
'*verification*',
'*credit_card*',
'cardToken', // mollie card token
'*cvv*',
'*iban*',
'*name*',
'*email*'
],

/*
|--------------------------------------------------------------------------
| Release git hash
|--------------------------------------------------------------------------
|
|
*/

// 'release' => trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')),

/*
|--------------------------------------------------------------------------
| Server setting
|--------------------------------------------------------------------------
|
| This setting allows you to change the server.
|
*/

'server' => env('LB_SERVER', 'https://www.larabug.com/api/log'),

/*
|--------------------------------------------------------------------------
| Verify SSL setting
|--------------------------------------------------------------------------
|
| Enables / disables the SSL verification when sending exceptions to LaraBug
| Never turn SSL verification off on production instances
|
*/
'verify_ssl' => env('LB_VERIFY_SSL', true),

];
6 changes: 5 additions & 1 deletion config/logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@
*/

'channels' => [
'larabug' => [
'driver' => 'larabug',
],

'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'channels' => ['single', 'larabug'],
'ignore_exceptions' => false,
],

Expand Down
10 changes: 8 additions & 2 deletions public/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<!-- Logo -->
<a class="logo ml-md-3" href="index.html" title="Help Desk">
<img src="/docs/assets/images/logo.png" alt="Help Desk" width="120" /> </a>
<span class="text-2 ml-2">v1.2.2</span>
<span class="text-2 ml-2">v1.2.3</span>
<!-- Logo End -->

<!-- Navbar Toggler -->
Expand Down Expand Up @@ -91,6 +91,7 @@
<li class="nav-item"><a class="nav-link" href="#idocs_faq">FAQ</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_changelog">Changelog</a>
<ul class="nav flex-column">
<li class="nav-item"><a class="nav-link" href="#v1-2-3">v1.2.3</a></li>
<li class="nav-item"><a class="nav-link" href="#v1-2-2">v1.2.2</a></li>
<li class="nav-item"><a class="nav-link" href="#v1-2-1">v1.2.1</a></li>
<li class="nav-item"><a class="nav-link" href="#v1-2-0">v1.2.0</a></li>
Expand Down Expand Up @@ -122,7 +123,7 @@ <h2>Help Desk</h2>
<div class="row">
<div class="col-sm-6 col-lg-4">
<ul class="list-unstyled">
<li><strong>Version:</strong> 1.2.2</li>
<li><strong>Version:</strong> 1.2.3</li>
<li><strong>Author:</strong> <a href="mailto:[email protected]"
target="_blank">heloufir</a>
</li>
Expand Down Expand Up @@ -319,6 +320,11 @@ <h5 class="mb-0"> <a href="#" class="collapsed" data-toggle="collapse" data-targ
<section id="idocs_changelog">
<h2>Changelog</h2>
<p class="text-4">See what's new added, changed, fixed, improved or updated in the latest versions. </p>
<h3 id="v1-2-3">Version 1.2.3 <small class="text-muted">(19 September, 2022)</small></h3>
<ul>
<li>Bug-fix: Ticket creation</li>
<li>Larabug integration</li>
</ul>
<h3 id="v1-2-2">Version 1.2.2 <small class="text-muted">(19 September, 2022)</small></h3>
<ul>
<li>Add ticket number</li>
Expand Down

0 comments on commit 96c0f77

Please sign in to comment.