Edit / PDF / Mail / ->Leads

This commit is contained in:
Kevin Adametz 2021-05-07 17:44:02 +02:00
parent 5d55e5be3f
commit 66ca252bfa
43 changed files with 2915 additions and 76 deletions

View file

@ -6,6 +6,7 @@
namespace App\Models;
use App\Models\Sym\TravelCountry;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
@ -123,6 +124,11 @@ class Customer extends Model
'country_id',
];
public static $salutationType = [
1 => 'Mann',
2 => 'Frau'
];
public function travel_country()
{
return $this->belongsTo(TravelCountry::class, 'country_id');
@ -154,6 +160,10 @@ class Customer extends Model
}
return $this->name;
}
public static function getCustomerCountriesArray(){
return TravelCountry::where('is_customer_country', 1)->get()->pluck('name', 'id');
}
}