File tree Expand file tree Collapse file tree
resources/views/support/tickets Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55use App \Models \SupportTicket ;
66use App \Models \User ;
7+ use Illuminate \Database \Eloquent \Casts \Attribute ;
78use Illuminate \Database \Eloquent \Factories \HasFactory ;
89use Illuminate \Database \Eloquent \Model ;
910use Illuminate \Database \Eloquent \Relations \BelongsTo ;
@@ -25,6 +26,11 @@ class Reply extends Model
2526 'note ' => 'boolean ' ,
2627 ];
2728
29+ public function isFromUser (): Attribute
30+ {
31+ return Attribute::get (fn () => $ this ->user_id === auth ()->user ()->id );
32+ }
33+
2834 public function user (): BelongsTo
2935 {
3036 return $ this ->belongsTo (User::class);
Original file line number Diff line number Diff line change 11<x-layout-three-columns >
2- <x-slot name =" title" >
3- {{ $supportTicket -> subject } }
4- </x-slot >
5-
6- <x-slot name =" header" >
7- <h1 class =" text-2xl font-semibold text-gray-900 dark:text-white" >
8- {{ $supportTicket -> subject } }
9- </h1 >
10- </x-slot >
11-
122 <section class =" mt-6" >
133 <div class =" rounded-lg bg-white shadow dark:bg-gray-800" >
144 <div class =" p-6" >
15- <h2 class =" mb-4 text-xl font-medium" >Ticket Details</h2 >
5+ <div class =" flex items-center justify-between mb-4" >
6+ <h2 class =" text-xl font-medium" >#{{ $supportTicket -> mask } } » ; {{ $supportTicket -> subject } } </h2 >
7+ <div class =" flex items-center space-x-3" >
8+ <button type =" button" class =" inline-flex items-center px-4 py-2 text-sm font-medium text-violet-700 bg-violet-100 border border-violet-200 rounded-lg hover:bg-violet-200 dark:bg-violet-900/30 dark:text-violet-300 dark:border-violet-800 dark:hover:bg-violet-900/50" >
9+ <svg class =" w-4 h-4 mr-2" fill =" none" stroke =" currentColor" viewBox =" 0 0 24 24" >
10+ <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6" />
11+ </svg >
12+ Reply
13+ </button >
14+ <button type =" button" class =" inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-700" >
15+ <svg class =" w-4 h-4 mr-2" fill =" none" stroke =" currentColor" viewBox =" 0 0 24 24" >
16+ <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M6 18L18 6M6 6l12 12" />
17+ </svg >
18+ Close Ticket
19+ </button >
20+ </div >
21+ </div >
1622 <p class =" text-gray-700 dark:text-gray-300" >
1723 Ticket ID: <strong >#{{ $supportTicket -> mask } } </strong ><br >
1824 Status: <strong >{{ $supportTicket -> status } } </strong ><br >
You can’t perform that action at this time.
0 commit comments