mini changes

This commit is contained in:
Muammer Top 2020-12-01 13:04:50 +03:00
parent 9f9ac22539
commit 23ff5f1441
2 changed files with 6 additions and 34 deletions

View File

@ -214,17 +214,12 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
}
public function getAdvDetailLinkByModel($object, $type = null)
{
if ($type != null) {
$id = $object->id;
$seo = str_slug($object->slug, '-');
return \route('adv_detail_seo', [$seo, $id]);
}
$id = $object->getObject()->id;
$seo = str_slug($object->getObject()->name, '-');
return \route('adv_detail_seo', [$seo, $id]);
}
public function getAdvDetailLinkByModel($object, $type = null)
{
$id = $object->id;
$seo = str_slug($object->slug, '-');
return \route('adv_detail_seo', [$seo, $id]);
}
public function getAdvDetailLinkByAdId($id)
{

View File

@ -1,23 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Anomaly\Streams\Platform\Database\Migration\Migration;
class VisiosoftModuleLocationAddAbvToCountries extends Migration
{
protected $delete = false;
protected $stream = [
'slug' => 'countries',
];
protected $fields = [
'abv' => 'anomaly.field_type.text',
];
protected $assignments = [
'abv',
];
}