i use below code for remove one record from roles table:
if ( $role = Role::find($id)) {
$role->delete();
return response()->json(['status' => 'success', 'message' => 'operation was successful.']);
}
but, an error happen and the message is:
Class name must be a valid object or a string
i google it!, for some answer i had to say config/entrust.php file exist.