$user = User::find(1); $userKey = $user->getKey(); // Output: // 1
$delete = User::where('id', '=', 1)->delete(); // Output: // int(1)In this code, the `where` statement specifies the primary key column name and the `delete()` method removes all of the rows that match the condition. The `getKey()` method is used by the Laravel framework to obtain the primary key of database records. It is included in the `Illuminate\Database\Eloquent` package library.