We want to stop algolia from nova dashboard only but we want to add algolia to website and api,
when we add Laravel\Scout\Searchable
to user model it work for both nova dashboard and website & API
Another question: i want to show name here instead of id but didn't work, what can i do ?
BelongsTo::make('Student', 'student', StudentDetail::class)
->nullable()
->sortable()
->searchable(),
As per the other answer, if you want to disable scout try:
public static function usesScout()
{
return false;
}
To display something other than the ID to identify a Nova resource you can
For example this would show the 'ID' as the title for your resource:
public static $title = 'id';
Whereas this would show the 'Name' as the title:
namespace App\Nova;
class StudentDetail extends Resource
{
public static $model = \App\Models\StudentDetail::class;
public static $title = 'name';
...
For example, you want to list the 'App\Model\User' class by last name and then first name. Thus "John Smith" is displayed as "Smith, John":
namespace App\Nova;
...
class User extends Resource
{
public static $model = \App\Models\User::class;
public function title() {
return $this->last_name . ', ' . $this->first_name
}