From 20fb9dbce98d502badd5ef6346332e72c17268a5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 15 Jan 2024 01:47:20 +0000
Subject: [PATCH 1/7] Bump aglipanci/laravel-pint-action from 2.3.0 to 2.3.1

Bumps [aglipanci/laravel-pint-action](https://github.com/aglipanci/laravel-pint-action) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/aglipanci/laravel-pint-action/releases)
- [Commits](https://github.com/aglipanci/laravel-pint-action/compare/2.3.0...2.3.1)

---
updated-dependencies:
- dependency-name: aglipanci/laravel-pint-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/fix-php-code-style-issues.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml
index 5afb454..46308bc 100644
--- a/.github/workflows/fix-php-code-style-issues.yml
+++ b/.github/workflows/fix-php-code-style-issues.yml
@@ -13,7 +13,7 @@ jobs:
           ref: ${{ github.head_ref }}
 
       - name: Fix PHP code style issues
-        uses: aglipanci/laravel-pint-action@2.3.0
+        uses: aglipanci/laravel-pint-action@2.3.1
 
       - name: Commit changes
         uses: stefanzweifel/git-auto-commit-action@v5

From 5714b919a1716f6e3061a54c08a589310305371e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 4 Mar 2024 01:23:19 +0000
Subject: [PATCH 2/7] Bump ramsey/composer-install from 2 to 3

Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 2 to 3.
- [Release notes](https://github.com/ramsey/composer-install/releases)
- [Commits](https://github.com/ramsey/composer-install/compare/v2...v3)

---
updated-dependencies:
- dependency-name: ramsey/composer-install
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/phpstan.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml
index ef19f38..29b5363 100644
--- a/.github/workflows/phpstan.yml
+++ b/.github/workflows/phpstan.yml
@@ -23,7 +23,7 @@ jobs:
           coverage: none
 
       - name: Install composer dependencies
-        uses: ramsey/composer-install@v2
+        uses: ramsey/composer-install@v3
 
       - name: Run PHPStan
         run: ./vendor/bin/phpstan --error-format=github

From 52e017b43848e0d110c37662d31a30c85619a622 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 25 Mar 2024 02:04:25 +0000
Subject: [PATCH 3/7] Bump dependabot/fetch-metadata from 1.6.0 to 2.0.0

Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.6.0 to 2.0.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.6.0...v2.0.0)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/dependabot-auto-merge.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml
index ca2197d..67e66c6 100644
--- a/.github/workflows/dependabot-auto-merge.yml
+++ b/.github/workflows/dependabot-auto-merge.yml
@@ -13,7 +13,7 @@ jobs:
     
       - name: Dependabot metadata
         id: metadata
-        uses: dependabot/fetch-metadata@v1.6.0
+        uses: dependabot/fetch-metadata@v2.0.0
         with:
           github-token: "${{ secrets.GITHUB_TOKEN }}"
           

From a33e012249d72a87ae5e72f4427df2a0fe59bcf9 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 15 Apr 2024 01:35:49 +0000
Subject: [PATCH 4/7] Bump aglipanci/laravel-pint-action from 2.3.1 to 2.4

Bumps [aglipanci/laravel-pint-action](https://github.com/aglipanci/laravel-pint-action) from 2.3.1 to 2.4.
- [Release notes](https://github.com/aglipanci/laravel-pint-action/releases)
- [Commits](https://github.com/aglipanci/laravel-pint-action/compare/2.3.1...2.4)

---
updated-dependencies:
- dependency-name: aglipanci/laravel-pint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/fix-php-code-style-issues.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml
index 46308bc..274e1e3 100644
--- a/.github/workflows/fix-php-code-style-issues.yml
+++ b/.github/workflows/fix-php-code-style-issues.yml
@@ -13,7 +13,7 @@ jobs:
           ref: ${{ github.head_ref }}
 
       - name: Fix PHP code style issues
-        uses: aglipanci/laravel-pint-action@2.3.1
+        uses: aglipanci/laravel-pint-action@2.4
 
       - name: Commit changes
         uses: stefanzweifel/git-auto-commit-action@v5

From 28e6fc058b3293b2b67e48f19ba111647b303d9b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 29 Apr 2024 01:41:06 +0000
Subject: [PATCH 5/7] Bump dependabot/fetch-metadata from 2.0.0 to 2.1.0

Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/dependabot-auto-merge.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml
index 67e66c6..611344a 100644
--- a/.github/workflows/dependabot-auto-merge.yml
+++ b/.github/workflows/dependabot-auto-merge.yml
@@ -13,7 +13,7 @@ jobs:
     
       - name: Dependabot metadata
         id: metadata
-        uses: dependabot/fetch-metadata@v2.0.0
+        uses: dependabot/fetch-metadata@v2.1.0
         with:
           github-token: "${{ secrets.GITHUB_TOKEN }}"
           

From 7199351bcd483671b15c18e8974539423105ba4a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 8 Jul 2024 01:10:04 +0000
Subject: [PATCH 6/7] Bump dependabot/fetch-metadata from 2.1.0 to 2.2.0

Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 .github/workflows/dependabot-auto-merge.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml
index 611344a..eb537d8 100644
--- a/.github/workflows/dependabot-auto-merge.yml
+++ b/.github/workflows/dependabot-auto-merge.yml
@@ -13,7 +13,7 @@ jobs:
     
       - name: Dependabot metadata
         id: metadata
-        uses: dependabot/fetch-metadata@v2.1.0
+        uses: dependabot/fetch-metadata@v2.2.0
         with:
           github-token: "${{ secrets.GITHUB_TOKEN }}"
           

From 1598ff727dfd31f361a22189b3c8557df752347e Mon Sep 17 00:00:00 2001
From: Giacomo Masseroni <giacomom@gmail.com>
Date: Fri, 6 Sep 2024 23:40:37 +0200
Subject: [PATCH 7/7] add models name in config file

---
 config/laravel_ticket.php | 10 +++++++++-
 src/Models/Category.php   |  2 +-
 src/Models/Label.php      |  2 +-
 src/Models/Message.php    |  2 +-
 src/Models/Ticket.php     |  8 ++++----
 5 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/config/laravel_ticket.php b/config/laravel_ticket.php
index 429083e..bb1c898 100644
--- a/config/laravel_ticket.php
+++ b/config/laravel_ticket.php
@@ -73,5 +73,13 @@
             ],
         ],
     ],
-
+    /**
+     * Models for Eloquent relationships
+     */
+    'models' => [
+        'ticket' => \Coderflex\LaravelTicket\Models\Ticket::class,
+        'message' => \Coderflex\LaravelTicket\Models\Message::class,
+        'category' => \Coderflex\LaravelTicket\Models\Category::class,
+        'label' => \Coderflex\LaravelTicket\Models\Label::class,
+    ]
 ];
diff --git a/src/Models/Category.php b/src/Models/Category.php
index 908f072..e3ed79f 100644
--- a/src/Models/Category.php
+++ b/src/Models/Category.php
@@ -24,7 +24,7 @@ class Category extends Model
      */
     public function tickets(): BelongsToMany
     {
-        return $this->belongsToMany(Ticket::class);
+        return $this->belongsToMany(config('laravel_ticket.models.ticket'));
     }
 
     /**
diff --git a/src/Models/Label.php b/src/Models/Label.php
index c8357c5..1446eb2 100644
--- a/src/Models/Label.php
+++ b/src/Models/Label.php
@@ -24,7 +24,7 @@ class Label extends Model
      */
     public function tickets(): BelongsToMany
     {
-        return $this->belongsToMany(Ticket::class);
+        return $this->belongsToMany(config('laravel_ticket.models.ticket'));
     }
 
     /**
diff --git a/src/Models/Message.php b/src/Models/Message.php
index 7b62db1..61e65f6 100644
--- a/src/Models/Message.php
+++ b/src/Models/Message.php
@@ -31,7 +31,7 @@ public function ticket(): BelongsTo
         $tableName = config('laravel_ticket.table_names.messages', 'messages');
 
         return $this->belongsTo(
-            Ticket::class,
+            config('laravel_ticket.models.ticket'),
             $tableName['columns']['ticket_foreign_id']
         );
     }
diff --git a/src/Models/Ticket.php b/src/Models/Ticket.php
index 316c76f..06a9aea 100644
--- a/src/Models/Ticket.php
+++ b/src/Models/Ticket.php
@@ -61,7 +61,7 @@ public function messages(): HasMany
         $tableName = config('laravel_ticket.table_names.messages', 'messages');
 
         return $this->hasMany(
-            Message::class,
+            config('laravel_ticket.models.message'),
             (string) $tableName['columns']['ticket_foreign_id'],
         );
     }
@@ -74,7 +74,7 @@ public function categories(): BelongsToMany
         $table = config('laravel_ticket.table_names.category_ticket', 'category_ticket');
 
         return $this->belongsToMany(
-            Category::class,
+            config('laravel_ticket.models.category'),
             $table['table'],
             $table['columns']['ticket_foreign_id'],
             $table['columns']['category_foreign_id'],
@@ -89,7 +89,7 @@ public function labels(): BelongsToMany
         $table = config('laravel_ticket.table_names.label_ticket', 'label_ticket');
 
         return $this->belongsToMany(
-            Label::class,
+            config('laravel_ticket.models.label'),
             $table['table'],
             $table['columns']['ticket_foreign_id'],
             $table['columns']['label_foreign_id'],
@@ -104,7 +104,7 @@ public function labels(): BelongsToMany
     public function getTable()
     {
         return config(
-            'laravel_ticket.table_names.tickets',
+            'laravel_ticket.models.tickets',
             parent::getTable()
         );
     }
