chore: code styling via pint
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Exception;
|
||||
use Carbon\Carbon;
|
||||
use Exception;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
@@ -13,7 +13,7 @@ class Ticket extends Model
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id', 'ticket_id', 'subject', 'message', 'status', 'last_response_at', 'ip_address'
|
||||
'user_id', 'ticket_id', 'subject', 'message', 'status', 'last_response_at', 'ip_address',
|
||||
];
|
||||
|
||||
protected static function boot()
|
||||
@@ -22,7 +22,7 @@ class Ticket extends Model
|
||||
|
||||
static::creating(function ($ticket) {
|
||||
if (empty($ticket->ticket_id)) {
|
||||
$ticket->ticket_id = 'TICKET-' . strtoupper(Str::random(6));
|
||||
$ticket->ticket_id = 'TICKET-'.strtoupper(Str::random(6));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -61,6 +61,7 @@ class Ticket extends Model
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (Exception $e) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user