Skip to content

Commit 96c0f77

Browse files
authored
Merge pull request #48 from devaslanphp/dev
Bug-fix: Ticket creation
2 parents 54e7882 + db93a80 commit 96c0f77

6 files changed

Lines changed: 230 additions & 6 deletions

File tree

app/Models/Ticket.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function comments(): HasMany
6464
public function ticketNumber(): Attribute
6565
{
6666
return new Attribute(
67-
get: fn() => $this->project->ticket_prefix . '' . $this->number
67+
get: fn() => $this->project?->ticket_prefix . '' . $this->number
6868
);
6969
}
7070
}

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"filament/notifications": "^2.15",
1111
"guzzlehttp/guzzle": "^7.2",
1212
"invaders-xx/filament-kanban-board": "^0.2.6",
13+
"larabug/larabug": "^2.5",
1314
"laravel/framework": "^9.19",
1415
"laravel/sanctum": "^3.0",
1516
"laravel/tinker": "^2.7",

composer.lock

Lines changed: 70 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/larabug.php

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Login key
8+
|--------------------------------------------------------------------------
9+
|
10+
| This is your authorization key which you get from your profile.
11+
| Retrieve your key from https://www.larabug.com
12+
|
13+
*/
14+
15+
'login_key' => env('LB_KEY', ''),
16+
17+
/*
18+
|--------------------------------------------------------------------------
19+
| Project key
20+
|--------------------------------------------------------------------------
21+
|
22+
| This is your project key which you receive when creating a project
23+
| Retrieve your key from https://www.larabug.com
24+
|
25+
*/
26+
27+
'project_key' => env('LB_PROJECT_KEY', ''),
28+
29+
/*
30+
|--------------------------------------------------------------------------
31+
| Environment setting
32+
|--------------------------------------------------------------------------
33+
|
34+
| This setting determines if the exception should be send over or not.
35+
|
36+
*/
37+
38+
'environments' => [
39+
'production',
40+
],
41+
42+
/*
43+
|--------------------------------------------------------------------------
44+
| Project version
45+
|--------------------------------------------------------------------------
46+
|
47+
| Set the project version, default: null.
48+
| For git repository: shell_exec("git log -1 --pretty=format:'%h' --abbrev-commit")
49+
|
50+
*/
51+
'project_version' => null,
52+
53+
/*
54+
|--------------------------------------------------------------------------
55+
| Lines near exception
56+
|--------------------------------------------------------------------------
57+
|
58+
| How many lines to show near exception line. The more you specify the bigger
59+
| the displayed code will be. Max value can be 50, will be defaulted to
60+
| 12 if higher than 50 automatically.
61+
|
62+
*/
63+
64+
'lines_count' => 12,
65+
66+
/*
67+
|--------------------------------------------------------------------------
68+
| Prevent duplicates
69+
|--------------------------------------------------------------------------
70+
|
71+
| Set the sleep time between duplicate exceptions. This value is in seconds, default: 60 seconds (1 minute)
72+
|
73+
*/
74+
75+
'sleep' => 60,
76+
77+
/*
78+
|--------------------------------------------------------------------------
79+
| Skip exceptions
80+
|--------------------------------------------------------------------------
81+
|
82+
| List of exceptions to skip sending.
83+
|
84+
*/
85+
86+
'except' => [
87+
'Symfony\Component\HttpKernel\Exception\NotFoundHttpException',
88+
],
89+
90+
/*
91+
|--------------------------------------------------------------------------
92+
| Key filtering
93+
|--------------------------------------------------------------------------
94+
|
95+
| Filter out these variables before sending them to LaraBug
96+
|
97+
*/
98+
99+
'blacklist' => [
100+
'*authorization*',
101+
'*password*',
102+
'*token*',
103+
'*auth*',
104+
'*verification*',
105+
'*credit_card*',
106+
'cardToken', // mollie card token
107+
'*cvv*',
108+
'*iban*',
109+
'*name*',
110+
'*email*'
111+
],
112+
113+
/*
114+
|--------------------------------------------------------------------------
115+
| Release git hash
116+
|--------------------------------------------------------------------------
117+
|
118+
|
119+
*/
120+
121+
// 'release' => trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')),
122+
123+
/*
124+
|--------------------------------------------------------------------------
125+
| Server setting
126+
|--------------------------------------------------------------------------
127+
|
128+
| This setting allows you to change the server.
129+
|
130+
*/
131+
132+
'server' => env('LB_SERVER', 'https://www.larabug.com/api/log'),
133+
134+
/*
135+
|--------------------------------------------------------------------------
136+
| Verify SSL setting
137+
|--------------------------------------------------------------------------
138+
|
139+
| Enables / disables the SSL verification when sending exceptions to LaraBug
140+
| Never turn SSL verification off on production instances
141+
|
142+
*/
143+
'verify_ssl' => env('LB_VERIFY_SSL', true),
144+
145+
];

config/logging.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,13 @@
5151
*/
5252

5353
'channels' => [
54+
'larabug' => [
55+
'driver' => 'larabug',
56+
],
57+
5458
'stack' => [
5559
'driver' => 'stack',
56-
'channels' => ['single'],
60+
'channels' => ['single', 'larabug'],
5761
'ignore_exceptions' => false,
5862
],
5963

public/docs/index.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<!-- Logo -->
5555
<a class="logo ml-md-3" href="index.html" title="Help Desk">
5656
<img src="/docs/assets/images/logo.png" alt="Help Desk" width="120" /> </a>
57-
<span class="text-2 ml-2">v1.2.2</span>
57+
<span class="text-2 ml-2">v1.2.3</span>
5858
<!-- Logo End -->
5959

6060
<!-- Navbar Toggler -->
@@ -91,6 +91,7 @@
9191
<li class="nav-item"><a class="nav-link" href="#idocs_faq">FAQ</a></li>
9292
<li class="nav-item"><a class="nav-link" href="#idocs_changelog">Changelog</a>
9393
<ul class="nav flex-column">
94+
<li class="nav-item"><a class="nav-link" href="#v1-2-3">v1.2.3</a></li>
9495
<li class="nav-item"><a class="nav-link" href="#v1-2-2">v1.2.2</a></li>
9596
<li class="nav-item"><a class="nav-link" href="#v1-2-1">v1.2.1</a></li>
9697
<li class="nav-item"><a class="nav-link" href="#v1-2-0">v1.2.0</a></li>
@@ -122,7 +123,7 @@ <h2>Help Desk</h2>
122123
<div class="row">
123124
<div class="col-sm-6 col-lg-4">
124125
<ul class="list-unstyled">
125-
<li><strong>Version:</strong> 1.2.2</li>
126+
<li><strong>Version:</strong> 1.2.3</li>
126127
<li><strong>Author:</strong> <a href="mailto:eloufirhatim@gmail.com"
127128
target="_blank">heloufir</a>
128129
</li>
@@ -319,6 +320,11 @@ <h5 class="mb-0"> <a href="#" class="collapsed" data-toggle="collapse" data-targ
319320
<section id="idocs_changelog">
320321
<h2>Changelog</h2>
321322
<p class="text-4">See what's new added, changed, fixed, improved or updated in the latest versions. </p>
323+
<h3 id="v1-2-3">Version 1.2.3 <small class="text-muted">(19 September, 2022)</small></h3>
324+
<ul>
325+
<li>Bug-fix: Ticket creation</li>
326+
<li>Larabug integration</li>
327+
</ul>
322328
<h3 id="v1-2-2">Version 1.2.2 <small class="text-muted">(19 September, 2022)</small></h3>
323329
<ul>
324330
<li>Add ticket number</li>

0 commit comments

Comments
 (0)