<?php

namespace App\Shop;

use Illuminate\Database\Eloquent\Model;

use App\Scopes\SortByLastUpdatedScope;

use Laravel\Scout\Searchable;

class ShopModel extends Model
{

    use Searchable;

    public $incrementing = false;
    protected $primaryKey = 'shop_id';
    protected $dates = ['source_created_at', 'source_modified_at'];

    /**
     * The attributes that aren't mass assignable.
     *
     * @var array
     */
    protected $guarded = [];

    protected static function boot()
    {

        parent::boot();
        static::addGlobalScope(new SortByLastUpdatedScope());

    }

    protected function searchableModel()
    {

        return kebab_case(class_basename(static::class));

    }

    protected function searchableSource()
    {

        return 'shop';

    }

    protected function searchableId()
    {

        return $this->searchableSource() .'-' .$this->searchableModel() .'-' .$this->shop_id;

    }

}

<?php

namespace App\Shop;

use Illuminate\Database\Eloquent\Model;

use App\Scopes\SortByLastUpdatedScope;

use Laravel\Scout\Searchable;

class ShopModel extends Model
{

    use Searchable;

    public $incrementing = false;
    protected $primaryKey = 'shop_id';
    protected $dates = ['source_created_at', 'source_modified_at'];

    /**
     * The attributes that aren't mass assignable.
     *
     * @var array
     */
    protected $guarded = [];

    protected static function boot()
    {

        parent::boot();
        static::addGlobalScope(new SortByLastUpdatedScope());

    }

    protected function searchableModel()
    {

        return kebab_case(class_basename(static::class));

    }

    protected function searchableSource()
    {

        return 'shop';

    }

    protected function searchableId()
    {

        return $this->searchableSource() .'/' .$this->searchableModel() .'/' .$this->shop_id;

    }

}

Use / as the primary delimiter in compound key
Use / as the primary delimiter in compound key

We want to avoid confusion between kebab_case'd model names,
and components of the compound key. If for some reason a dev
wants to parse the compound key (i.e. the Solr key) into parts,
using a different top-level delimiter will ease this process.
