Eloquent requires each model to have at least one uniquely identifying "ID" that can serve as its primary key. "Composite" primary keys are not supported by Eloquent models. However, you are free to add additional multi-column, unique indexes to your database tables in addition to the table's uniquely identifying primary key.
@amitsolanki24_ Hi, I think you have the response from Laravel docs as I mentioned:
However, you are free to add additional multi-column, unique indexes to your database tables in addition to the table's uniquely identifying primary key.
In your migration file, you have to add a column for the composite key:
$table->index(['name', 'country']);
Now, a composite index has been added to your table which speed up your queries. This is a database optimisation, the queries remain the same.