File: /var/www/ipsremont-demo/app/Models/ShipmentServerResponse.php
<?php
namespace App\Models;
use App\Traits\My;
use Illuminate\Database\Eloquent\SoftDeletes;
class ShipmentServerResponse extends BaseModel
{
use SoftDeletes, My;
protected $table = 'shipment_server_response';
public function shipment()
{
return $this->belongsTo(Shipment::class);
}
public function _save($shipment_id, $response, $curl_error, $error_text, $url, $delivery_service)
{
$this->shipment_id = $shipment_id;
$this->response = $response;
$this->curl_error = $curl_error;
$this->error_text = $error_text;
$this->url = $url;
$this->delivery_service = $delivery_service;
$this->save();
}
}