Try it
Generate new fresh migration using php artisan migrate:make
and write below code
public function up() {
Schema::table('users', function(Blueprint $table) {
$table->dropPrimary('users_id_primary');
$table->integer("userID");
$table->primary('userID');
});
}
public function down() {
Schema::table('users', function(Blueprint $table) {
$table->dropPrimary('userID');
$table->dropColumn('userID');
$table->primary('users_id_primary');
});
}
Then after run php artisan migrate
Next and change you User
Model
use Cartalyst\Sentry\Users\Eloquent\User as SentryUserModel;
class User extends SentryUserModel {
protected $primaryKey = 'userID';
}
Next
php artisan config:publish cartalyst/sentry
Next open the config file in app/config/packages/cartalyst/sentry
and edit
'users' => array(
'model' => 'User',
...
),
Hope it will be helpful :)