Customers Add+Edit, API WP

This commit is contained in:
Kevin Adametz 2020-06-12 14:46:51 +02:00
parent dc63fa9fb2
commit 75a0f9a38a
120 changed files with 11894 additions and 6134 deletions

View file

@ -3,6 +3,7 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* App\Models\ShoppingOrder
@ -53,11 +54,27 @@ use Illuminate\Database\Eloquent\Model;
* @mixin \Eloquent
* @property int|null $payment_for
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder wherePaymentFor($value)
* @property int|null $member_id
* @property string|null $mode
* @property-read \App\User|null $member
* @property-read \App\Models\UserHistory|null $user_history
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereMemberId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereMode($value)
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property string|null $user_deleted_at
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUserDeletedAt($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withoutTrashed()
*/
class ShoppingOrder extends Model
{
protected $table = 'shopping_orders';
use SoftDeletes;
protected $dates = ['deleted_at'];
protected $fillable = [
'shopping_user_id',
'auth_user_id',
@ -71,6 +88,8 @@ class ShoppingOrder extends Model
'tax',
'total_shipping',
'weight',
'paid',
'txaction',
'mode',
];
@ -82,7 +101,12 @@ class ShoppingOrder extends Model
public function country()
{
return $this->belongsTo('App\Models\Country','country_id');
return $this->belongsTo('App\Models\Sh','country_id');
}
public function shipping_country()
{
return $this->belongsTo('App\Models\ShippingCountry','country_id');
}
public function user_shop()